From 85c5fb76f3c70d5ec5b9d32b9bbc3901ee79615c Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 29 Nov 2022 09:21:56 +0900 Subject: [PATCH 1/7] Change min PHP version to 8.0 --- public/index.php | 2 +- spark | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/index.php b/public/index.php index 96e7f45ff4ac..eb3abd0fb42b 100644 --- a/public/index.php +++ b/public/index.php @@ -1,7 +1,7 @@ Date: Tue, 29 Nov 2022 09:25:02 +0900 Subject: [PATCH 2/7] chore: require ^8.0 in composer.json --- admin/framework/composer.json | 2 +- admin/starter/composer.json | 2 +- admin/userguide/composer.json | 2 +- composer.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/framework/composer.json b/admin/framework/composer.json index 982204b8c83b..b0953a9f8d07 100644 --- a/admin/framework/composer.json +++ b/admin/framework/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/admin/starter/composer.json b/admin/starter/composer.json index e52218478b04..be95dfc15b26 100644 --- a/admin/starter/composer.json +++ b/admin/starter/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "codeigniter4/framework": "^4.0" }, "require-dev": { diff --git a/admin/userguide/composer.json b/admin/userguide/composer.json index 007664b9b2ec..35860af8d02b 100644 --- a/admin/userguide/composer.json +++ b/admin/userguide/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "codeigniter4/framework": "^4" }, "support": { diff --git a/composer.json b/composer.json index 5e12de117047..8569419f338c 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", From d63ea51f7af5954224836a759f5b1fee9abfd1bc Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 29 Nov 2022 09:25:55 +0900 Subject: [PATCH 3/7] chore: drop PHP 7.4 in workflows --- .github/workflows/test-coding-standards.yml | 2 +- .github/workflows/test-phpunit.yml | 6 +----- .github/workflows/test-rector.yml | 2 +- admin/starter/.github/workflows/phpunit.yml | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml index 99e6bd4a3b14..699b03524de5 100644 --- a/.github/workflows/test-coding-standards.yml +++ b/.github/workflows/test-coding-standards.yml @@ -25,8 +25,8 @@ jobs: fail-fast: false matrix: php-version: - - '7.4' - '8.0' + - '8.1' steps: - name: Checkout diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml index 7c6182cac13c..a82a9ef073a4 100644 --- a/.github/workflows/test-phpunit.yml +++ b/.github/workflows/test-phpunit.yml @@ -50,7 +50,6 @@ jobs: strategy: matrix: php-version: - - '7.4' - '8.0' - '8.1' - '8.2' @@ -79,7 +78,6 @@ jobs: fail-fast: false matrix: php-version: - - '7.4' - '8.0' - '8.1' - '8.2' @@ -92,7 +90,7 @@ jobs: mysql-version: - '5.7' include: - - php-version: '7.4' + - php-version: '8.0' db-platform: MySQLi mysql-version: '8.0' - php-version: '8.2' @@ -120,7 +118,6 @@ jobs: strategy: matrix: php-version: - - '7.4' - '8.0' - '8.1' - '8.2' @@ -148,7 +145,6 @@ jobs: strategy: matrix: php-version: - - '7.4' - '8.0' - '8.1' - '8.2' diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml index 7d8c11d61362..8288cd9725f1 100644 --- a/.github/workflows/test-rector.yml +++ b/.github/workflows/test-rector.yml @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0'] + php-versions: ['8.0', '8.1'] paths: - app - system diff --git a/admin/starter/.github/workflows/phpunit.yml b/admin/starter/.github/workflows/phpunit.yml index 73d413cad92f..9b54b83b8d22 100644 --- a/admin/starter/.github/workflows/phpunit.yml +++ b/admin/starter/.github/workflows/phpunit.yml @@ -2,7 +2,7 @@ name: PHPUnit on: pull_request: - branches: + branches: - develop jobs: @@ -11,7 +11,7 @@ jobs: strategy: matrix: - php-versions: ['7.4', '8.0'] + php-versions: ['8.0', '8.1'] runs-on: ubuntu-latest From 516add27a45e6e5ebf592ce19caf4847f2435f21 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 29 Nov 2022 09:26:53 +0900 Subject: [PATCH 4/7] docs: require min PHP version 8.0 --- README.md | 2 +- admin/framework/README.md | 2 +- admin/starter/README.md | 2 +- contributing/pull_request.md | 2 +- user_guide_src/source/installation/upgrade_4xx.rst | 2 +- user_guide_src/source/intro/requirements.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7d2940a21246..512456e364a9 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Made with [contrib.rocks](https://contrib.rocks). ## Server Requirements -PHP version 7.4 or higher is required, with the following extensions installed: +PHP version 8.0 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) diff --git a/admin/framework/README.md b/admin/framework/README.md index 870e5f96adff..914d9a17427c 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 7.4 or higher is required, with the following extensions installed: +PHP version 8.0 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) diff --git a/admin/starter/README.md b/admin/starter/README.md index 461e949f2f26..8062a2cb6c13 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 7.4 or higher is required, with the following extensions installed: +PHP version 8.0 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) diff --git a/contributing/pull_request.md b/contributing/pull_request.md index a28e5e75d171..85dd044ec4c1 100644 --- a/contributing/pull_request.md +++ b/contributing/pull_request.md @@ -136,7 +136,7 @@ See [Contribution CSS](./css.md). ### Compatibility -CodeIgniter4 requires [PHP 7.4](https://php.net/releases/7_4_0.php). +CodeIgniter4 requires [PHP 8.0](https://php.net/releases/8_0_0.php). ### Backwards Compatibility diff --git a/user_guide_src/source/installation/upgrade_4xx.rst b/user_guide_src/source/installation/upgrade_4xx.rst index 1a35121d8f7d..cced3913097e 100644 --- a/user_guide_src/source/installation/upgrade_4xx.rst +++ b/user_guide_src/source/installation/upgrade_4xx.rst @@ -41,7 +41,7 @@ Downloads Namespaces ========== -- CI4 is built for PHP 7.4+, and everything in the framework is namespaced, except for the helpers. +- CI4 is built for PHP 8.0+, and everything in the framework is namespaced, except for the helpers. Application Structure ===================== diff --git a/user_guide_src/source/intro/requirements.rst b/user_guide_src/source/intro/requirements.rst index 191e264733ec..b1b473192d22 100644 --- a/user_guide_src/source/intro/requirements.rst +++ b/user_guide_src/source/intro/requirements.rst @@ -2,7 +2,7 @@ Server Requirements ################### -`PHP `_ version 7.4 or newer is required, with the following PHP extensions are enabled: +`PHP `_ version 8.0 or newer is required, with the following PHP extensions are enabled: - `intl `_ - `mbstring `_ From ff6d54652c652abb467e0eed723a4a3377ddbdac Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 29 Nov 2022 09:28:14 +0900 Subject: [PATCH 5/7] refactor: remove version check `version_compare(PHP_VERSION, '8.0.0', '>=')` --- system/Autoloader/Autoloader.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/system/Autoloader/Autoloader.php b/system/Autoloader/Autoloader.php index ad4de0329d66..f8b678a5e0c7 100644 --- a/system/Autoloader/Autoloader.php +++ b/system/Autoloader/Autoloader.php @@ -344,11 +344,7 @@ public function sanitizeFilename(string $filename): string ); } if ($result === false) { - if (version_compare(PHP_VERSION, '8.0.0', '>=')) { - $message = preg_last_error_msg(); - } else { - $message = 'Regex error. error code: ' . preg_last_error(); - } + $message = preg_last_error_msg(); throw new RuntimeException($message . '. filename: "' . $filename . '"'); } From 67decbb18264afc66802e40298d7e7825fc049f2 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 2 Dec 2022 08:33:50 +0900 Subject: [PATCH 6/7] chore: run tests with only one PHP version --- .github/workflows/test-coding-standards.yml | 11 ++--------- .github/workflows/test-rector.yml | 5 ++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml index 699b03524de5..001c71e2e62e 100644 --- a/.github/workflows/test-coding-standards.yml +++ b/.github/workflows/test-coding-standards.yml @@ -18,16 +18,9 @@ concurrency: jobs: lint: - name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer + name: Lint with PHP CS Fixer runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - php-version: - - '8.0' - - '8.1' - steps: - name: Checkout uses: actions/checkout@v3 @@ -35,7 +28,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-version }} + php-version: '8.1' extensions: tokenizer coverage: none diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml index 8288cd9725f1..d695d2c388f5 100644 --- a/.github/workflows/test-rector.yml +++ b/.github/workflows/test-rector.yml @@ -35,12 +35,11 @@ concurrency: jobs: build: - name: PHP ${{ matrix.php-versions }} Analyze code (Rector) on ${{ matrix.paths }} + name: Analyze code (Rector) runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - php-versions: ['8.0', '8.1'] paths: - app - system @@ -53,7 +52,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: '8.1' extensions: intl - name: Use latest Composer From 9625b12ccd537d8aed0d306c4651768222cb2bb4 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 2 Dec 2022 08:37:36 +0900 Subject: [PATCH 7/7] docs: add changelog v4.4.0 --- user_guide_src/source/changelogs/index.rst | 1 + user_guide_src/source/changelogs/v4.4.0.rst | 77 +++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 user_guide_src/source/changelogs/v4.4.0.rst diff --git a/user_guide_src/source/changelogs/index.rst b/user_guide_src/source/changelogs/index.rst index 3b0166c70850..8efdf1f7e275 100644 --- a/user_guide_src/source/changelogs/index.rst +++ b/user_guide_src/source/changelogs/index.rst @@ -12,6 +12,7 @@ See all the changes. .. toctree:: :titlesonly: + v4.4.0 v4.3.0 v4.2.10 v4.2.9 diff --git a/user_guide_src/source/changelogs/v4.4.0.rst b/user_guide_src/source/changelogs/v4.4.0.rst new file mode 100644 index 000000000000..d370e293c4cd --- /dev/null +++ b/user_guide_src/source/changelogs/v4.4.0.rst @@ -0,0 +1,77 @@ +Version 4.4.0 +############# + +Release Date: Unreleased + +**4.4.0 release of CodeIgniter4** + +.. contents:: + :local: + :depth: 3 + +Highlights +********** + +- Update minimal PHP requirement to 8.0. +- TBD + +BREAKING +******** + +Behavior Changes +================ + +Interface Changes +================= + +Method Signature Changes +======================== + +Enhancements +************ + +Commands +======== + +Testing +======= + +Database +======== + +Query Builder +------------- + +Forge +----- + +Others +------ + +Model +===== + +Libraries +========= + +Helpers and Functions +===================== + +Others +====== + +Message Changes +*************** + +Changes +******* + +- Update minimal PHP requirement to 8.0. + +Deprecations +************ + +Bugs Fixed +********** + +See the repo's `CHANGELOG.md `_ for a complete list of bugs fixed.