Bump CodeIgniter4 to 4.5.5 (#4106)

Updated composer.json and composer.lock.

- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_452.html
- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_453.html (this bumps several packages)
- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_454.html
- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_455.html

Signed-off-by: objecttothis <objecttothis@gmail.com>
This commit is contained in:
objecttothis authored and GitHub committed 2024-11-05 22:38:54 +01:00
1 parent d946b31cf4
commit 00a5e1b897
8 files changed
+1402 -787

No files matched your search

+2 -2
View File
@@ -76,7 +76,7 @@ class ContentSecurityPolicy extends BaseConfig
'https://fonts.googleapis.com',
];
/**
/**
* Defines the origins from which images can be loaded.
*
* @var list<string>|string
@@ -169,7 +169,7 @@ class ContentSecurityPolicy extends BaseConfig
*/
public $manifestSrc;
/**
/**
* Limits the kinds of plugins a page may invoke.
*
* @var list<string>|string|null
+2 -2
View File
@@ -26,7 +26,7 @@ use CodeIgniter\HotReloader\HotReloader;
* Events::on('create', [$myInstance, 'myMethod']);
*/
Events::on('pre_system', static function () {
Events::on('pre_system', static function (): void {
if (ENVIRONMENT !== 'testing') {
if (ini_get('zlib.output_compression')) {
throw FrameworkException::forEnabledZlibOutputCompression();
@@ -50,7 +50,7 @@ Events::on('pre_system', static function () {
Services::toolbar()->respond();
// Hot Reload route - for framework use on the hot reloader.
if (ENVIRONMENT === 'development') {
Services::routes()->get('__hot-reload', static function () {
Services::routes()->get('__hot-reload', static function (): void {
(new HotReloader())->run();
});
}
+3 -5
View File
@@ -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;
+7 -7
View File
@@ -31,25 +31,25 @@
"matrix": "https://matrix.to/#/#opensourcepos_Lobby:gitter.im"
},
"require": {
"php": "~8.1",
"codeigniter4/framework": "4.5.1",
"php": "^8.1",
"codeigniter4/framework": "4.5.5",
"dompdf/dompdf": "^2.0.3",
"ezyang/htmlpurifier": "^4.17",
"laminas/laminas-escaper": "2.13.0",
"laminas/laminas-escaper": "^2.13",
"paragonie/random_compat": "^2.0.21",
"picqer/php-barcode-generator": "^2.4.0",
"tamtamchik/namecase": "^3.0.0"
},
"require-dev": {
"codeigniter/coding-standard": "^1.7",
"codeigniter4/devkit": "^1.2.2",
"codeigniter4/devkit": "^1.2.3",
"fakerphp/faker": "^1.23.0",
"friendsofphp/php-cs-fixer": "3.47.1",
"friendsofphp/php-cs-fixer": "^3.47.1",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.6",
"phpunit/phpunit": "9.6.19",
"predis/predis": "^1.1||^2.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0",
"roave/security-advisories": "dev-latest"
},
"replace": {
Generated
+1374 -749
View File
File diff suppressed because it is too large. Load diff
+11 -19
View File
@@ -29,19 +29,6 @@ require __DIR__ . '/app/Config/Paths.php';
// Path to the front controller
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR);
/**
* See https://www.php.net/manual/en/function.str-contains.php#126277
*/
if (! function_exists('str_contains')) {
/**
* Polyfill of str_contains()
*/
function str_contains(string $haystack, string $needle): bool
{
return empty($needle) || strpos($haystack, $needle) !== false;
}
}
class preload
{
/**
@@ -56,17 +43,20 @@ class preload
'/system/Database/Postgre/',
'/system/Database/SQLite3/',
'/system/Database/SQLSRV/',
// Not needed.
// Not needed for web apps.
'/system/Database/Seeder.php',
'/system/Test/',
'/system/Language/',
'/system/CLI/',
'/system/Commands/',
'/system/Publisher/',
'/system/ComposerScripts.php',
// Not Class/Function files.
'/system/Config/Routes.php',
'/system/Language/',
'/system/bootstrap.php',
'/system/rewrite.php',
'/Views/',
// Errors occur.
'/system/Config/Routes.php',
'/system/ThirdParty/',
],
],
@@ -77,16 +67,18 @@ class preload
$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']);
+1 -1
View File
@@ -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");
}
+2 -2
View File
@@ -1,6 +1,6 @@
<IfModule authz_core_module>
Require all denied
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
Deny from all
</IfModule>