Skip to content

Commit 08dd2c6

Browse files
committed
feat: "system/bootstrap.php" shows upgrade error message
1 parent 44583a4 commit 08dd2c6

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

system/bootstrap.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
/**
1515
* ---------------------------------------------------------------
16-
*
17-
* @deprecated 4.5.0 This file is no longer used. Moved to Boot.php.
16+
* This file cannot be used. The code has moved to Boot.php.
1817
* ---------------------------------------------------------------
1918
*/
2019

@@ -24,6 +23,15 @@
2423
use Config\Paths;
2524
use Config\Services;
2625

26+
header('HTTP/1.1 503 Service Unavailable.', true, 503);
27+
28+
$message = 'This "system/bootstrap.php" is no longer used. If you are seeing this error message,
29+
the upgrade is not complete. Please refer to the upgrade guide and complete the upgrade.
30+
See https://codeigniter4.github.io/userguide/installation/upgrade_450.html' . PHP_EOL;
31+
echo $message;
32+
33+
exit(1);
34+
2735
/*
2836
* ---------------------------------------------------------------
2937
* SETUP OUR PATH CONSTANTS
@@ -37,7 +45,7 @@
3745
/** @var Paths $paths */
3846

3947
// The path to the application directory.
40-
if (! defined('APPPATH')) {
48+
if (! defined('APPPATH')) { // @phpstan-ignore-line
4149
define('APPPATH', realpath(rtrim($paths->appDirectory, '\\/ ')) . DIRECTORY_SEPARATOR);
4250
}
4351

user_guide_src/source/changelogs/v4.5.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ Others
251251
- **BaseModel:** The ``getIdValue()`` method has been changed to ``abstract``.
252252
- **Routing:** The :ref:`404-override` feature does change the Response status
253253
code to 404 by default. See :ref:`Upgrading Guide <upgrade-450-404-override>`.
254+
- **system/bootstrap.php:** This file cannot be used. The code has been moved to
255+
the new ``CodeIgniter\Boot`` class.
254256

255257
Interface Changes
256258
=================
@@ -471,8 +473,6 @@ Deprecations
471473
been moved to the ``Autoloader``.
472474
- The ``configureKint()`` method has been deprecated. No longer used. It has
473475
been moved to the ``Autoloader``.
474-
- **system/bootstrap.php:** This file has been deprecated. No longer used.
475-
The code has been moved to the new ``CodeIgniter\Boot`` class.
476476
- **Response:** The constructor parameter ``$config`` has been deprecated. No
477477
longer used.
478478
- **Filters:**

0 commit comments

Comments
 (0)