diff --git a/README.md b/README.md index 43eb3718..d14b4c9c 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,10 @@ PHP version 8.1 or higher is required, with the following extensions installed: - [mbstring](http://php.net/manual/en/mbstring.installation.php) > [!WARNING] -> The end of life date for PHP 7.4 was November 28, 2022. -> The end of life date for PHP 8.0 was November 26, 2023. -> If you are still using PHP 7.4 or 8.0, you should upgrade immediately. -> The end of life date for PHP 8.1 will be November 25, 2024. +> - The end of life date for PHP 7.4 was November 28, 2022. +> - The end of life date for PHP 8.0 was November 26, 2023. +> - If you are still using PHP 7.4 or 8.0, you should upgrade immediately. +> - The end of life date for PHP 8.1 will be December 31, 2025. Additionally, make sure that the following extensions are enabled in your PHP: diff --git a/app/Config/DocTypes.php b/app/Config/DocTypes.php old mode 100755 new mode 100644 diff --git a/app/Config/Exceptions.php b/app/Config/Exceptions.php index c240675e..4e339634 100644 --- a/app/Config/Exceptions.php +++ b/app/Config/Exceptions.php @@ -60,12 +60,10 @@ class Exceptions extends BaseConfig /** * -------------------------------------------------------------------------- - * LOG DEPRECATIONS INSTEAD OF THROWING? + * WHETHER TO THROW AN EXCEPTION ON DEPRECATED ERRORS * -------------------------------------------------------------------------- - * By default, CodeIgniter converts deprecations into exceptions. Also, - * starting in PHP 8.1 will cause a lot of deprecated usage warnings. - * Use this option to temporarily cease the warnings and instead log those. - * This option also works for user deprecations. + * If set to `true`, DEPRECATED errors are only logged and no exceptions are + * thrown. This option also works for user deprecations. */ public bool $logDeprecations = true; diff --git a/phpunit.xml.dist b/phpunit.xml.dist index dea94087..b408a99d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ __DIR__ . '/vendor/codeigniter4/framework/system', // Change this path if using manual installation 'exclude' => [ + '/system/bootstrap.php', // Not needed if you don't use them. '/system/Database/OCI8/', '/system/Database/Postgre/', @@ -77,16 +65,18 @@ public function __construct() $this->loadAutoloader(); } - private function loadAutoloader() + private function loadAutoloader(): void { $paths = new Config\Paths(); - require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php'; + require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'Boot.php'; + + CodeIgniter\Boot::preload($paths); } /** * Load PHP files. */ - public function load() + public function load(): void { foreach ($this->paths as $path) { $directory = new RecursiveDirectoryIterator($path['include']); diff --git a/spark b/spark index a56fbc1b..992d044c 100755 --- a/spark +++ b/spark @@ -25,7 +25,7 @@ */ // Refuse to run when called from php-cgi -if (strpos(PHP_SAPI, 'cgi') === 0) { +if (str_starts_with(PHP_SAPI, 'cgi')) { exit("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n"); } diff --git a/tests/.htaccess b/tests/.htaccess old mode 100755 new mode 100644 diff --git a/tests/index.html b/tests/index.html old mode 100755 new mode 100644 diff --git a/writable/.htaccess b/writable/.htaccess old mode 100755 new mode 100644 diff --git a/writable/cache/index.html b/writable/cache/index.html old mode 100755 new mode 100644 diff --git a/writable/index.html b/writable/index.html old mode 100755 new mode 100644 diff --git a/writable/logs/index.html b/writable/logs/index.html old mode 100755 new mode 100644 diff --git a/writable/session/index.html b/writable/session/index.html old mode 100755 new mode 100644 diff --git a/writable/uploads/index.html b/writable/uploads/index.html old mode 100755 new mode 100644