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

codeigniter4 / CodeIgniter4 / 15161682795

21 May 2025 12:04PM UTC coverage: 84.109% (-0.2%) from 84.265%
15161682795

push

github

paulbalandan
Merge branch 'develop' into 4.7

43 of 82 new or added lines in 4 files covered. (52.44%)

6 existing lines in 1 file now uncovered.

20827 of 24762 relevant lines covered (84.11%)

191.06 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

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

21
/*
22
 * ---------------------------------------------------------------
23
 * DEFINE ENVIRONMENT
24
 * ---------------------------------------------------------------
25
 *
26
 * As this bootstrap file is primarily used by internal scripts
27
 * across the framework and other CodeIgniter projects, we need
28
 * to make sure it recognizes that we're in development.
29
 */
30

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

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

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

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

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

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

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

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

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

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

NEW
83
require $paths->systemDirectory . '/Boot.php';
×
NEW
84
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

© 2025 Coveralls, Inc