diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 3f99053424ec..21790a4b419b 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -25,10 +25,10 @@ body:
description: Which PHP versions did you run your code?
multiple: true
options:
- - '8.2'
- '8.3'
- '8.4'
- '8.5'
+ - '8.6'
validations:
required: true
diff --git a/.github/instructions/user-guide.instructions.md b/.github/instructions/user-guide.instructions.md
index c5eafc5a3999..d12be54e5477 100644
--- a/.github/instructions/user-guide.instructions.md
+++ b/.github/instructions/user-guide.instructions.md
@@ -10,7 +10,7 @@ applyTo: "docs/**/*.md"
trailing spaces that end a line as a hard line break.
- Add a new page to the page's folder `index.md` and run
`php admin/update-docs-nav.php` to add it to `docs/.nav.yml`.
-- Keep PHP examples compatible with PHP 8.2 and verify signatures and behavior
+- Keep PHP examples compatible with PHP 8.3 and verify signatures and behavior
against the current framework code.
- Distinguish new behavior from existing behavior and document defaults
precisely.
diff --git a/.github/workflows/deploy-apidocs.yml b/.github/workflows/deploy-apidocs.yml
index d34fce914406..28a83f0ff1ea 100644
--- a/.github/workflows/deploy-apidocs.yml
+++ b/.github/workflows/deploy-apidocs.yml
@@ -46,7 +46,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
- php-version: '8.2'
+ php-version: '8.3'
tools: phive
coverage: none
diff --git a/.github/workflows/test-autoreview.yml b/.github/workflows/test-autoreview.yml
index 26b50e049208..bc15312abc66 100644
--- a/.github/workflows/test-autoreview.yml
+++ b/.github/workflows/test-autoreview.yml
@@ -26,7 +26,7 @@ jobs:
name: Automatic Code Review
uses: ./.github/workflows/reusable-serviceless-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo
with:
- job-name: PHP 8.2
- php-version: '8.2'
+ job-name: PHP 8.3
+ php-version: '8.3'
job-id: auto-review-tests
group-name: AutoReview
diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml
index 36043268a1d3..4a00c0a576c0 100644
--- a/.github/workflows/test-coding-standards.yml
+++ b/.github/workflows/test-coding-standards.yml
@@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- - '8.2'
+ - '8.3'
include:
- php-version: '8.5'
composer-option: '--ignore-platform-req=php'
diff --git a/.github/workflows/test-composer-normalize.yml b/.github/workflows/test-composer-normalize.yml
index 164c2424976c..77dac9757ea2 100644
--- a/.github/workflows/test-composer-normalize.yml
+++ b/.github/workflows/test-composer-normalize.yml
@@ -31,7 +31,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
- php-version: '8.2'
+ php-version: '8.3'
coverage: none
- name: Install dependencies
diff --git a/.github/workflows/test-file-permissions.yml b/.github/workflows/test-file-permissions.yml
index 93621c7df308..17cda4716c3b 100644
--- a/.github/workflows/test-file-permissions.yml
+++ b/.github/workflows/test-file-permissions.yml
@@ -23,7 +23,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.2'
+ php-version: '8.3'
- name: Detect unnecessary execution permissions
run: php utils/check_permission_x.php
diff --git a/.github/workflows/test-phpstan.yml b/.github/workflows/test-phpstan.yml
index d16ab6d98a27..2e39b980cb30 100644
--- a/.github/workflows/test-phpstan.yml
+++ b/.github/workflows/test-phpstan.yml
@@ -51,7 +51,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
- php-version: '8.2'
+ php-version: '8.3'
extensions: intl
coverage: none
@@ -69,9 +69,9 @@ jobs:
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
- key: composer-php-8.2-${{ hashFiles('**/composer.json') }}
+ key: composer-php-8.3-${{ hashFiles('**/composer.json') }}
restore-keys: |
- composer-php-8.2-
+ composer-php-8.3-
composer-
- name: Create PHPStan result cache directory
diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml
index 8c17cae53de6..d5613a499443 100644
--- a/.github/workflows/test-phpunit.yml
+++ b/.github/workflows/test-phpunit.yml
@@ -47,7 +47,7 @@ jobs:
steps:
- id: coverage-php-version
run: |
- echo "version=8.2" >> $GITHUB_OUTPUT
+ echo "version=8.3" >> $GITHUB_OUTPUT
sanity-tests:
name: Others
@@ -56,7 +56,6 @@ jobs:
strategy:
matrix:
php-version:
- - '8.2'
- '8.3'
- '8.4'
- '8.5'
@@ -82,7 +81,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- - '8.2'
- '8.3'
- '8.4'
- '8.5'
@@ -95,7 +93,7 @@ jobs:
mysql-version:
- '8.0'
include:
- - php-version: '8.2'
+ - php-version: '8.3'
db-platform: MySQLi
mysql-version: '5.7'
@@ -121,7 +119,6 @@ jobs:
strategy:
matrix:
php-version:
- - '8.2'
- '8.3'
- '8.4'
- '8.5'
@@ -146,7 +143,6 @@ jobs:
strategy:
matrix:
php-version:
- - '8.2'
- '8.3'
- '8.4'
- '8.5'
diff --git a/.github/workflows/test-psalm.yml b/.github/workflows/test-psalm.yml
index d76b74def520..5c82b9c7ad6e 100644
--- a/.github/workflows/test-psalm.yml
+++ b/.github/workflows/test-psalm.yml
@@ -40,7 +40,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- - '8.2'
+ - '8.3'
steps:
- name: Checkout
diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml
index 4e603df49e44..32aae543cdce 100644
--- a/.github/workflows/test-rector.yml
+++ b/.github/workflows/test-rector.yml
@@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- - '8.2'
+ - '8.3'
include:
- php-version: '8.5'
composer-option: '--ignore-platform-req=php'
diff --git a/.github/workflows/test-structarmed.yml b/.github/workflows/test-structarmed.yml
index b064b8213d07..2987bf1a044b 100644
--- a/.github/workflows/test-structarmed.yml
+++ b/.github/workflows/test-structarmed.yml
@@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- - '8.2'
+ - '8.3'
- '8.5'
steps:
diff --git a/.github/workflows/test-userguide.yml b/.github/workflows/test-userguide.yml
index b2fb438ae8da..023ed59addf3 100644
--- a/.github/workflows/test-userguide.yml
+++ b/.github/workflows/test-userguide.yml
@@ -34,14 +34,9 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
- php-version: '8.2'
+ php-version: '8.3'
coverage: none
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: '8.2'
-
- name: Setup Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml
index 711cac7bf4a8..96bcd27a2b76 100644
--- a/.github/workflows/verify-release.yml
+++ b/.github/workflows/verify-release.yml
@@ -73,7 +73,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
- php-version: '8.2'
+ php-version: '8.3'
tools: composer
extensions: intl, gd
coverage: xdebug
diff --git a/AGENTS.md b/AGENTS.md
index 6330111a3058..415f02320b39 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -93,7 +93,7 @@ compatibility policy applies to what the latest tagged release ships.
### All base branches
-- Production code must run on PHP 8.2. Do not require a newer PHP version,
+- Production code must run on PHP 8.3. Do not require a newer PHP version,
even when a newer version is installed locally.
- Signatures, properties, constants, default values, exceptions, side
effects, configuration, and generated project files are all
@@ -116,7 +116,7 @@ compatibility policy applies to what the latest tagged release ships.
intentional compatibility constraints. Do not remove an exclusion without
dedicated justification and tests.
- Every new class property must have a native type declaration. Use the
- most precise type supported by PHP 8.2; use `mixed` only when the
+ most precise type supported by PHP 8.3; use `mixed` only when the
property intentionally accepts unrelated types.
- Do not add or change a type on an existing public or protected property
mechanically. Property types affect inheritance and must follow the
diff --git a/README.md b/README.md
index 8557b8d2a00d..436dad041d10 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,7 @@ Made with [contrib.rocks](https://contrib.rocks).
## Server Requirements
-PHP version 8.2 or higher is required, with the following extensions installed:
+PHP version 8.3 or higher is required, with the following extensions installed:
- [intl](http://php.net/manual/en/intl.requirements.php)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
@@ -96,8 +96,9 @@ PHP version 8.2 or higher is required, with the following extensions installed:
> - 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.
> - The end of life date for PHP 8.1 was December 31, 2025.
-> - If you are still using a PHP version below 8.2, you should upgrade immediately.
-> - The end of life date for PHP 8.2 will be December 31, 2026.
+> - The end of life date for PHP 8.2 was December 31, 2026.
+> - If you are still using a PHP version below 8.3, you should upgrade immediately.
+> - The end of life date for PHP 8.3 will be December 31, 2027.
Additionally, make sure that the following extensions are enabled in your PHP:
diff --git a/admin/framework/README.md b/admin/framework/README.md
index dd39ef950968..c13a866f48a3 100644
--- a/admin/framework/README.md
+++ b/admin/framework/README.md
@@ -42,7 +42,7 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/
## Server Requirements
-PHP version 8.2 or higher is required, with the following extensions installed:
+PHP version 8.3 or higher is required, with the following extensions installed:
- [intl](http://php.net/manual/en/intl.requirements.php)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
@@ -51,8 +51,9 @@ PHP version 8.2 or higher is required, with the following extensions installed:
> - 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.
> - The end of life date for PHP 8.1 was December 31, 2025.
-> - If you are still using below PHP 8.2, you should upgrade immediately.
-> - The end of life date for PHP 8.2 will be December 31, 2026.
+> - The end of life date for PHP 8.2 was December 31, 2026.
+> - If you are still using a PHP version below 8.3, you should upgrade immediately.
+> - The end of life date for PHP 8.3 will be December 31, 2027.
Additionally, make sure that the following extensions are enabled in your PHP:
diff --git a/admin/framework/composer.json b/admin/framework/composer.json
index ab34d89fd260..667c668b013c 100644
--- a/admin/framework/composer.json
+++ b/admin/framework/composer.json
@@ -10,7 +10,7 @@
"slack": "https://codeigniterchat.slack.com"
},
"require": {
- "php": "^8.2",
+ "php": "^8.3",
"ext-intl": "*",
"ext-mbstring": "*",
"laminas/laminas-escaper": "^2.18",
diff --git a/admin/starter/.github/workflows/phpunit.yml b/admin/starter/.github/workflows/phpunit.yml
index 308e0565835f..c16bf136dea6 100644
--- a/admin/starter/.github/workflows/phpunit.yml
+++ b/admin/starter/.github/workflows/phpunit.yml
@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
- php-versions: ['8.2', '8.5']
+ php-versions: ['8.3', '8.5']
runs-on: ubuntu-24.04
if: (! contains(github.event.pull_request.title, '[ci skip]'))
diff --git a/admin/starter/README.md b/admin/starter/README.md
index 45f98af6033e..f29d071dfc6b 100644
--- a/admin/starter/README.md
+++ b/admin/starter/README.md
@@ -50,7 +50,7 @@ Problems with it can be raised on our forum, or as issues in the main repository
## Server Requirements
-PHP version 8.2 or higher is required, with the following extensions installed:
+PHP version 8.3 or higher is required, with the following extensions installed:
- [intl](http://php.net/manual/en/intl.requirements.php)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
@@ -59,8 +59,9 @@ PHP version 8.2 or higher is required, with the following extensions installed:
> - 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.
> - The end of life date for PHP 8.1 was December 31, 2025.
-> - If you are still using below PHP 8.2, you should upgrade immediately.
-> - The end of life date for PHP 8.2 will be December 31, 2026.
+> - The end of life date for PHP 8.2 was December 31, 2026.
+> - If you are still using a PHP version below 8.3, you should upgrade immediately.
+> - The end of life date for PHP 8.3 will be December 31, 2027.
Additionally, make sure that the following extensions are enabled in your PHP:
diff --git a/admin/starter/composer.json b/admin/starter/composer.json
index d47149e0287f..163c103af2e6 100644
--- a/admin/starter/composer.json
+++ b/admin/starter/composer.json
@@ -10,7 +10,7 @@
"slack": "https://codeigniterchat.slack.com"
},
"require": {
- "php": "^8.2",
+ "php": "^8.3",
"codeigniter4/framework": "^4.7"
},
"require-dev": {
diff --git a/composer.json b/composer.json
index f8aa3f13bd64..12c8a368a7e6 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"slack": "https://codeigniterchat.slack.com"
},
"require": {
- "php": "^8.2",
+ "php": "^8.3",
"ext-intl": "*",
"ext-mbstring": "*",
"laminas/laminas-escaper": "^2.18",
diff --git a/contributing/pull_request.md b/contributing/pull_request.md
index 1264e3fbd7c7..97be48cbec9c 100644
--- a/contributing/pull_request.md
+++ b/contributing/pull_request.md
@@ -162,7 +162,7 @@ See [Contribution CSS](./css.md).
### Compatibility
-CodeIgniter4 requires [PHP 8.2](https://php.net/releases/8_2_0.php).
+CodeIgniter4 requires [PHP 8.3](https://php.net/releases/8_3_0.php).
### Backwards Compatibility
diff --git a/docs/changelogs/v4.8.0.md b/docs/changelogs/v4.8.0.md
index 1ae64cc014c0..bf8159d308e3 100644
--- a/docs/changelogs/v4.8.0.md
+++ b/docs/changelogs/v4.8.0.md
@@ -6,7 +6,7 @@ Release Date: Unreleased
## Highlights
-- TBD
+- Update minimum PHP requirement to `8.3`.
## BREAKING
diff --git a/docs/installation/installing_composer.md b/docs/installation/installing_composer.md
index 4f7fad62226d..cd918fc83e82 100644
--- a/docs/installation/installing_composer.md
+++ b/docs/installation/installing_composer.md
@@ -3,7 +3,7 @@
Composer can be used in two ways to install CodeIgniter4 on your system.
!!! important "Important"
- CodeIgniter4 requires Composer 2.0.14 or later.
+ CodeIgniter4 requires Composer 2.0.14 or later. If you are running CodeIgniter4 on PHP `8.6`, you must use Composer 2.11.1 or later to ensure compatibility.
!!! note "Note"
If you are not familiar with Composer, we recommend you read [Basic usage](https://getcomposer.org/doc/01-basic-usage.md) first.
diff --git a/docs/installation/running.md b/docs/installation/running.md
index d246df841c90..5346d8268cae 100644
--- a/docs/installation/running.md
+++ b/docs/installation/running.md
@@ -105,7 +105,7 @@ The local development server can be customized with three command line options:
- You can also choose a specific version of PHP to use, with the `--php` CLI option, with its value set to the path of the PHP executable you want to use:
```console
- php spark serve --php /usr/bin/php8.2
+ php spark serve --php /usr/bin/php8.3
```
## Worker Mode with FrankenPHP
@@ -399,7 +399,7 @@ See [Handling Multiple Environments](../general/environments.md#apache).
## Hosting with nginx
-nginx is the second most widely used HTTP server for web hosting. Here you can find an example configuration using PHP 8.2 FPM (unix sockets) under Ubuntu Server.
+nginx is the second most widely used HTTP server for web hosting. Here you can find an example configuration using PHP 8.3 FPM (unix sockets) under Ubuntu Server.
### default.conf
@@ -423,7 +423,7 @@ server {
include snippets/fastcgi-php.conf;
# With php-fpm:
- fastcgi_pass unix:/run/php/php8.2-fpm.sock;
+ fastcgi_pass unix:/run/php/php8.3-fpm.sock;
# With php-cgi:
# fastcgi_pass 127.0.0.1:9000;
}
diff --git a/docs/intro/requirements.md b/docs/intro/requirements.md
index 0fbf5d09724b..b1ac36fb1bfa 100644
--- a/docs/intro/requirements.md
+++ b/docs/intro/requirements.md
@@ -2,7 +2,7 @@
## PHP and Required Extensions
-[PHP](https://www.php.net/) version 8.2 or newer is required, with the following PHP extensions enabled:
+[PHP](https://www.php.net/) version 8.3 or newer is required, with the following PHP extensions enabled:
- [intl](https://www.php.net/manual/en/intl.requirements.php)
- [mbstring](https://www.php.net/manual/en/mbstring.installation.php)
@@ -11,8 +11,9 @@
- 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.
- The end of life date for PHP 8.1 was December 31, 2025.
- - **If you are still using a PHP version below 8.2, you should upgrade immediately.**
- - The end of life date for PHP 8.2 will be December 31, 2026.
+ - The end of life date for PHP 8.2 was December 31, 2026.
+ - **If you are still using a PHP version below 8.3, you should upgrade immediately**.
+ - The end of life date for PHP 8.3 will be December 31, 2027.
!!! note "Note"
- PHP 8.5 requires CodeIgniter 4.7.0 or later.
diff --git a/phpstan.dist.neon b/phpstan.dist.neon
index 37cc5719dc84..394b6dd62614 100644
--- a/phpstan.dist.neon
+++ b/phpstan.dist.neon
@@ -3,7 +3,7 @@ includes:
parameters:
phpVersion:
- min: 80200
+ min: 80300
max: 80599
tmpDir: build/phpstan
level: 6
diff --git a/public/index.php b/public/index.php
index 8e834f2c863d..8809313dce90 100644
--- a/public/index.php
+++ b/public/index.php
@@ -9,7 +9,7 @@
*---------------------------------------------------------------
*/
-$minPhpVersion = '8.2'; // If you update this, don't forget to update `spark`.
+$minPhpVersion = '8.3'; // If you update this, don't forget to update `spark`.
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
diff --git a/rector.php b/rector.php
index 4e7bddc4728b..f3ce95569a19 100644
--- a/rector.php
+++ b/rector.php
@@ -27,6 +27,7 @@
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
+use Rector\Php83\Rector\ClassConst\AddTypeToConstRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
use Rector\PHPUnit\CodeQuality\Rector\StmtsAwareInterface\DeclareStrictTypesTestsRector;
use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector;
@@ -45,7 +46,7 @@
use Utils\Rector\UnderscoreToCamelCaseVariableNameRector;
return RectorConfig::configure()
- ->withPhpSets(php82: true)
+ ->withPhpSets(php83: true)
->withPreparedSets(deadCode: true, codeQuality: true, instanceOf: true, phpunitCodeQuality: true)
->withComposerBased(phpunit: true)
->withParallel(120, 8, 10)
@@ -84,6 +85,7 @@
__DIR__ . '/tests/system/View/Views',
YieldDataProviderRector::class,
+ AddTypeToConstRector::class,
RemoveUnusedPrivateMethodRector::class => [
// private method called via getPrivateMethodInvoker
diff --git a/spark b/spark
index 61bc572b9759..503854d84f48 100755
--- a/spark
+++ b/spark
@@ -38,7 +38,7 @@ if (str_starts_with(PHP_SAPI, 'cgi')) {
*---------------------------------------------------------------
*/
-$minPhpVersion = '8.2'; // If you update this, don't forget to update `public/index.php`.
+$minPhpVersion = '8.3'; // If you update this, don't forget to update `public/index.php`.
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
diff --git a/system/Commands/Worker/Views/frankenphp-worker.php.tpl b/system/Commands/Worker/Views/frankenphp-worker.php.tpl
index 801bf796f343..786ac9fb3424 100644
--- a/system/Commands/Worker/Views/frankenphp-worker.php.tpl
+++ b/system/Commands/Worker/Views/frankenphp-worker.php.tpl
@@ -24,7 +24,7 @@ use Config\WorkerMode;
*---------------------------------------------------------------
*/
-$minPhpVersion = '8.2';
+$minPhpVersion = '8.3';
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
http_response_code(503);
exit("PHP {$minPhpVersion}+ required. Current: " . PHP_VERSION);
diff --git a/system/Debug/BaseExceptionHandler.php b/system/Debug/BaseExceptionHandler.php
index 27e2916390c7..70a60f5f997e 100644
--- a/system/Debug/BaseExceptionHandler.php
+++ b/system/Debug/BaseExceptionHandler.php
@@ -184,14 +184,9 @@ protected static function highlightFile(string $file, int $lineNumber, int $line
$source = str_replace(["\r\n", "\r"], "\n", $source);
$source = explode("\n", highlight_string($source, true));
- if (PHP_VERSION_ID < 80300) {
- $source = str_replace('
', "\n", $source[1]);
- $source = explode("\n", str_replace("\r\n", "\n", $source));
- } else {
- // We have to remove these tags since we're preparing the result
- // ourselves and these tags are added manually at the end.
- $source = str_replace(['
', ''], '', $source);
- }
+ // We have to remove these tags since we're preparing the result
+ // ourselves and these tags are added manually at the end.
+ $source = str_replace(['', ''], '', $source);
// Get just the part to show
$start = max($lineNumber - (int) round($lines / 2), 0);
diff --git a/tests/_support/Debug/highlightFile_pre_80300.html b/tests/_support/Debug/highlightFile_pre_80300.html
deleted file mode 100644
index 9b48ebd2b889..000000000000
--- a/tests/_support/Debug/highlightFile_pre_80300.html
+++ /dev/null
@@ -1,16 +0,0 @@
- 9 *
-10 * For the full copyright and license information, please view
-11 * the LICENSE file that was distributed with this source code.
-12 */
-13
-14 namespace Tests\Support\Controllers;
-15
-16 use CodeIgniter\Controller;
-17
-18 class Hello extends Controller
-19 {
-20 public function index()
-21 {
-22 return 'Hello';
-23 }
-
\ No newline at end of file
diff --git a/tests/system/Debug/ExceptionHandlerTest.php b/tests/system/Debug/ExceptionHandlerTest.php
index 41930421eeb6..f7284d54f01c 100644
--- a/tests/system/Debug/ExceptionHandlerTest.php
+++ b/tests/system/Debug/ExceptionHandlerTest.php
@@ -427,12 +427,7 @@ public function testHighlightFile(): void
$highlightFile = self::getPrivateMethodInvoker($this->handler, 'highlightFile');
$result = $highlightFile(SUPPORTPATH . 'Controllers' . DIRECTORY_SEPARATOR . 'Hello.php', 16);
- $resultFile = match (true) {
- PHP_VERSION_ID < 80300 => 'highlightFile_pre_80300.html',
- default => 'highlightFile.html',
- };
-
- $expected = file_get_contents(SUPPORTPATH . 'Debug' . DIRECTORY_SEPARATOR . $resultFile);
+ $expected = file_get_contents(SUPPORTPATH . 'Debug' . DIRECTORY_SEPARATOR . 'highlightFile.html');
$this->assertSame($expected, $result);
diff --git a/tests/system/Entity/EntityTest.php b/tests/system/Entity/EntityTest.php
index 4f3fcc9e0c73..84604e2e77f8 100644
--- a/tests/system/Entity/EntityTest.php
+++ b/tests/system/Entity/EntityTest.php
@@ -2812,8 +2812,8 @@ public function testHasChangedWithValueObjectsUsingToString(): void
$emailClass = new class () {
public static function create(string $email): object
{
- return new class ($email) {
- public function __construct(private readonly string $email)
+ return new readonly class ($email) {
+ public function __construct(private string $email)
{
}
diff --git a/tests/system/Helpers/TextHelperTest.php b/tests/system/Helpers/TextHelperTest.php
index 88878bcf8294..2caf612925e0 100644
--- a/tests/system/Helpers/TextHelperTest.php
+++ b/tests/system/Helpers/TextHelperTest.php
@@ -301,12 +301,7 @@ public function testCensoredWordsNonReplacement(): void
public function testHighlightCode(): void
{
- // PHP 8.3 changes the output.
- if (PHP_VERSION_ID >= 80300) {
- $expect = '<?php var_dump($this); ?> ?>';
- } else {
- $expect = "\n<?php var_dump(\$this); ?> \n\n";
- }
+ $expect = '<?php var_dump($this); ?> ?>';
$this->assertSame($expect, highlight_code(''));
}
diff --git a/tests/system/View/ParserFilterTest.php b/tests/system/View/ParserFilterTest.php
index 3e4c4d40d9b6..4637b56c23c7 100644
--- a/tests/system/View/ParserFilterTest.php
+++ b/tests/system/View/ParserFilterTest.php
@@ -182,19 +182,9 @@ public function testHighlightCode(): void
$template = '{ value1|highlight_code }';
- // PHP 8.3 changes the output.
- if (PHP_VERSION_ID >= 80300) {
- $expected = <<<'EOF'
- Sincerely ?>
- EOF;
- } else {
- $expected = <<<'EOF'
-
- Sincerely
-
-
- EOF;
- }
+ $expected = <<<'EOF'
+ Sincerely ?>
+ EOF;
$this->assertSame($expected, $parser->renderString($template));
}
diff --git a/utils/composer.json b/utils/composer.json
index 9b5250df0352..33155ce245a8 100644
--- a/utils/composer.json
+++ b/utils/composer.json
@@ -1,6 +1,6 @@
{
"require": {
- "php": "^8.2",
+ "php": "^8.3",
"codeigniter/coding-standard": "^1.7",
"ergebnis/composer-normalize": "^2.28",
"friendsofphp/php-cs-fixer": "^3.76",