Skip to content

Commit a4c5bb6

Browse files
committed
Release v4.5.2
1 parent 03e4ce6 commit a4c5bb6

14 files changed

+15
-27
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ PHP version 8.1 or higher is required, with the following extensions installed:
5656
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
5757

5858
> [!WARNING]
59-
> The end of life date for PHP 7.4 was November 28, 2022.
60-
> The end of life date for PHP 8.0 was November 26, 2023.
61-
> If you are still using PHP 7.4 or 8.0, you should upgrade immediately.
62-
> The end of life date for PHP 8.1 will be November 25, 2024.
59+
> - The end of life date for PHP 7.4 was November 28, 2022.
60+
> - The end of life date for PHP 8.0 was November 26, 2023.
61+
> - If you are still using PHP 7.4 or 8.0, you should upgrade immediately.
62+
> - The end of life date for PHP 8.1 will be December 31, 2025.
6363
6464
Additionally, make sure that the following extensions are enabled in your PHP:
6565

app/Config/DocTypes.php

100755100644
File mode changed.

app/Config/Exceptions.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ class Exceptions extends BaseConfig
6060

6161
/**
6262
* --------------------------------------------------------------------------
63-
* LOG DEPRECATIONS INSTEAD OF THROWING?
63+
* WHETHER TO THROW AN EXCEPTION ON DEPRECATED ERRORS
6464
* --------------------------------------------------------------------------
65-
* By default, CodeIgniter converts deprecations into exceptions. Also,
66-
* starting in PHP 8.1 will cause a lot of deprecated usage warnings.
67-
* Use this option to temporarily cease the warnings and instead log those.
68-
* This option also works for user deprecations.
65+
* If set to `true`, DEPRECATED errors are only logged and no exceptions are
66+
* thrown. This option also works for user deprecations.
6967
*/
7068
public bool $logDeprecations = true;
7169

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5-
bootstrap="system/Test/bootstrap.php"
5+
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
66
backupGlobals="false"
77
beStrictAboutOutputDuringTests="true"
88
colors="true"

preload.php

+6-16
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,6 @@
2929
// Path to the front controller
3030
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR);
3131

32-
/**
33-
* See https://www.php.net/manual/en/function.str-contains.php#126277
34-
*/
35-
if (! function_exists('str_contains')) {
36-
/**
37-
* Polyfill of str_contains()
38-
*/
39-
function str_contains(string $haystack, string $needle): bool
40-
{
41-
return empty($needle) || strpos($haystack, $needle) !== false;
42-
}
43-
}
44-
4532
class preload
4633
{
4734
/**
@@ -51,6 +38,7 @@ class preload
5138
[
5239
'include' => __DIR__ . '/vendor/codeigniter4/framework/system', // Change this path if using manual installation
5340
'exclude' => [
41+
'/system/bootstrap.php',
5442
// Not needed if you don't use them.
5543
'/system/Database/OCI8/',
5644
'/system/Database/Postgre/',
@@ -77,16 +65,18 @@ public function __construct()
7765
$this->loadAutoloader();
7866
}
7967

80-
private function loadAutoloader()
68+
private function loadAutoloader(): void
8169
{
8270
$paths = new Config\Paths();
83-
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
71+
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'Boot.php';
72+
73+
CodeIgniter\Boot::preload($paths);
8474
}
8575

8676
/**
8777
* Load PHP files.
8878
*/
89-
public function load()
79+
public function load(): void
9080
{
9181
foreach ($this->paths as $path) {
9282
$directory = new RecursiveDirectoryIterator($path['include']);

spark

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
// Refuse to run when called from php-cgi
28-
if (strpos(PHP_SAPI, 'cgi') === 0) {
28+
if (str_starts_with(PHP_SAPI, 'cgi')) {
2929
exit("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n");
3030
}
3131

tests/.htaccess

100755100644
File mode changed.

tests/index.html

100755100644
File mode changed.

writable/.htaccess

100755100644
File mode changed.

writable/cache/index.html

100755100644
File mode changed.

writable/index.html

100755100644
File mode changed.

writable/logs/index.html

100755100644
File mode changed.

writable/session/index.html

100755100644
File mode changed.

writable/uploads/index.html

100755100644
File mode changed.

0 commit comments

Comments
 (0)