• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeigniter4 / CodeIgniter4 / 28378730935

29 Jun 2026 02:17PM UTC coverage: 88.309%. Remained the same
28378730935

push

github

web-flow
refactor: bump to phpstan-codeigniter v2.1 (#10312)

14 of 21 new or added lines in 9 files covered. (66.67%)

22200 of 25139 relevant lines covered (88.31%)

211.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/system/util_bootstrap.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of CodeIgniter 4 framework.
7
 *
8
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
use CodeIgniter\Boot;
15
use Config\Paths;
16

17
error_reporting(E_ALL);
×
18
ini_set('display_errors', '1');
×
19
ini_set('display_startup_errors', '1');
×
20

21
/*
22
 * ---------------------------------------------------------------
23
 * DEFINE ENVIRONMENT
24
 * ---------------------------------------------------------------
25
 *
26
 * The environment defaults to development. A caller may set
27
 * $_SERVER['CI_ENVIRONMENT'] before including this file to override it.
28
 */
29

NEW
30
$_SERVER['CI_ENVIRONMENT'] ??= 'development';
×
NEW
31
defined('ENVIRONMENT') || define('ENVIRONMENT', $_SERVER['CI_ENVIRONMENT']);
×
NEW
32
defined('CI_DEBUG')    || define('CI_DEBUG', true);
×
33

34
/*
35
 * ---------------------------------------------------------------
36
 * SET UP OUR PATH CONSTANTS
37
 * ---------------------------------------------------------------
38
 *
39
 * The path constants provide convenient access to the folders
40
 * throughout the application. We have to set them up here
41
 * so they are available in the config files that are loaded.
42
 */
43

44
defined('HOMEPATH') || define('HOMEPATH', realpath(rtrim(getcwd(), '\\/ ')) . DIRECTORY_SEPARATOR);
×
45

46
$source = match (true) {
×
47
    is_dir(HOMEPATH . 'app/')                   => HOMEPATH,
×
48
    is_dir('vendor/codeigniter4/framework/')    => 'vendor/codeigniter4/framework/',
×
49
    is_dir('vendor/codeigniter4/codeigniter4/') => 'vendor/codeigniter4/codeigniter4/',
×
50
    default                                     => throw new RuntimeException('Unable to determine the source directory.'),
×
51
};
×
52

53
defined('CONFIGPATH') || define('CONFIGPATH', realpath($source . 'app/Config') . DIRECTORY_SEPARATOR);
×
54
defined('PUBLICPATH') || define('PUBLICPATH', realpath($source . 'public') . DIRECTORY_SEPARATOR);
×
55
unset($source);
×
56

57
require CONFIGPATH . 'Paths.php';
×
58
$paths = new Paths();
×
59

60
defined('CIPATH') || define('CIPATH', realpath($paths->systemDirectory . '/../') . DIRECTORY_SEPARATOR);
×
61
defined('FCPATH') || define('FCPATH', PUBLICPATH);
×
62

63
if (is_dir($paths->testsDirectory . '/_support/') && ! defined('SUPPORTPATH')) {
×
64
    define('SUPPORTPATH', realpath($paths->testsDirectory . '/_support/') . DIRECTORY_SEPARATOR);
×
65
}
66

67
if (is_dir(HOMEPATH . 'vendor/')) {
×
68
    define('VENDORPATH', realpath(HOMEPATH . 'vendor/') . DIRECTORY_SEPARATOR);
×
69
    define('COMPOSER_PATH', (string) realpath(HOMEPATH . 'vendor/autoload.php'));
×
70
}
71

72
/*
73
 *---------------------------------------------------------------
74
 * BOOTSTRAP THE APPLICATION
75
 *---------------------------------------------------------------
76
 *
77
 * This process sets up the path constants, loads and registers
78
 * our autoloader, along with Composer's, loads our constants
79
 * and fires up an environment-specific bootstrapping.
80
 */
81

82
require $paths->systemDirectory . '/Boot.php';
×
83
Boot::bootConsole($paths);
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc