From 842fd6eae9d8ddad0177d47da587c38e6f721e25 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 17 Mar 2024 09:59:08 +0900 Subject: [PATCH] feat: "system/bootstrap.php" shows upgrade error message --- system/bootstrap.php | 12 ++++++++++-- user_guide_src/source/changelogs/v4.5.0.rst | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/system/bootstrap.php b/system/bootstrap.php index f091aa3065..c0b0214947 100644 --- a/system/bootstrap.php +++ b/system/bootstrap.php @@ -13,8 +13,7 @@ declare(strict_types=1); /** * --------------------------------------------------------------- - * - * @deprecated 4.5.0 This file is no longer used. Moved to Boot.php. + * This file cannot be used. The code has moved to Boot.php. * --------------------------------------------------------------- */ @@ -24,6 +23,13 @@ use Config\Modules; use Config\Paths; use Config\Services; +header('HTTP/1.1 503 Service Unavailable.', true, 503); + +$message = 'This "system/bootstrap.php" is no longer used. If you are seeing this error message, +the upgrade is not complete. Please refer to the upgrade guide and complete the upgrade. +See https://codeigniter4.github.io/userguide/installation/upgrade_450.html' . PHP_EOL; +echo $message; + /* * --------------------------------------------------------------- * SETUP OUR PATH CONSTANTS @@ -153,3 +159,5 @@ if (! is_file(COMPOSER_PATH)) { */ Services::autoloader()->initializeKint(CI_DEBUG); + +exit(1); diff --git a/user_guide_src/source/changelogs/v4.5.0.rst b/user_guide_src/source/changelogs/v4.5.0.rst index b311358e79..7d1a6c1023 100644 --- a/user_guide_src/source/changelogs/v4.5.0.rst +++ b/user_guide_src/source/changelogs/v4.5.0.rst @@ -251,6 +251,8 @@ Others - **BaseModel:** The ``getIdValue()`` method has been changed to ``abstract``. - **Routing:** The :ref:`404-override` feature does change the Response status code to 404 by default. See :ref:`Upgrading Guide `. +- **system/bootstrap.php:** This file cannot be used. The code has been moved to + the new ``CodeIgniter\Boot`` class. Interface Changes ================= @@ -471,8 +473,6 @@ Deprecations been moved to the ``Autoloader``. - The ``configureKint()`` method has been deprecated. No longer used. It has been moved to the ``Autoloader``. -- **system/bootstrap.php:** This file has been deprecated. No longer used. - The code has been moved to the new ``CodeIgniter\Boot`` class. - **Response:** The constructor parameter ``$config`` has been deprecated. No longer used. - **Filters:**