Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop PHP 7.4 support #6922

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/workflows/test-coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,17 @@ 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:
- '7.4'
- '8.0'

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: '8.1'
extensions: tokenizer
coverage: none

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
Expand Down Expand Up @@ -79,7 +78,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
Expand All @@ -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'
Expand Down Expand Up @@ -120,7 +118,6 @@ jobs:
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
Expand Down Expand Up @@ -148,7 +145,6 @@ jobs:
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ['7.4', '8.0']
paths:
- app
- system
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion admin/framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
4 changes: 2 additions & 2 deletions admin/starter/.github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PHPUnit

on:
pull_request:
branches:
branches:
- develop

jobs:
Expand All @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
php-versions: ['7.4', '8.0']
php-versions: ['8.0', '8.1']

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion admin/starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion admin/starter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion admin/userguide/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://codeigniter.com",
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0",
"codeigniter4/framework": "^4"
},
"support": {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
2 changes: 1 addition & 1 deletion contributing/pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

// Check PHP version.
$minPhpVersion = '7.4'; // If you update this, don't forget to update `spark`.
$minPhpVersion = '8.0'; // 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',
Expand Down
2 changes: 1 addition & 1 deletion spark
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (strpos(PHP_SAPI, 'cgi') === 0) {
}

// Check PHP version.
$minPhpVersion = '7.4'; // If you update this, don't forget to update `public/index.php`.
$minPhpVersion = '8.0'; // 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',
Expand Down
6 changes: 1 addition & 5 deletions system/Autoloader/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 . '"');
}
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelogs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See all the changes.
.. toctree::
:titlesonly:

v4.4.0
v4.3.0
v4.2.10
v4.2.9
Expand Down
77 changes: 77 additions & 0 deletions user_guide_src/source/changelogs/v4.4.0.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_4xx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====================
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/intro/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Server Requirements
###################

`PHP <https://www.php.net/>`_ version 7.4 or newer is required, with the following PHP extensions are enabled:
`PHP <https://www.php.net/>`_ version 8.0 or newer is required, with the following PHP extensions are enabled:

- `intl <https://www.php.net/manual/en/intl.requirements.php>`_
- `mbstring <https://www.php.net/manual/en/mbstring.requirements.php>`_
Expand Down