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

Raise version min PHP 7.3. #20134

Merged
merged 21 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ce813e5
Raise version min `PHP 7.3`.
terabytesoftw Mar 20, 2024
c2d4691
Update composer.json
terabytesoftw Mar 20, 2024
ae7db0a
Only coverage `PHP 7.4` and upload version tests `scrutinizer.yml`.
terabytesoftw Mar 20, 2024
aec3b79
Change `@expectException` with `$this->expectException`.
terabytesoftw Mar 20, 2024
daae9cf
Update composer.json to require PHP 7.3 or higher.
terabytesoftw Mar 21, 2024
f8884dc
Add line to `CHANGELOG,md`.
terabytesoftw Mar 21, 2024
a9ac7f5
Update PHP version requirement to `7.3.0` or higher in `requirements.…
terabytesoftw Mar 21, 2024
1a34aaa
Update docs `PHP` version requirement to `7.3.0` or higher.
terabytesoftw Mar 21, 2024
e4e470f
Update `PHP` version requirement to `7.3.0` or higher in `README.md`.
terabytesoftw Mar 21, 2024
e82127e
Update arrayTypedProperty declaration to use PHP 7.4 typed properties.
terabytesoftw Mar 21, 2024
5a434ee
Fix IsOneOfAssert constructor parameter type declaration.
terabytesoftw Mar 21, 2024
e10fd41
Fix build.yml action.
terabytesoftw Mar 21, 2024
d852773
Revert use `@requires`.
terabytesoftw Mar 21, 2024
efa3296
Revert remove `testCastValues()` in `ActiveRecordTest.php`.
terabytesoftw Mar 21, 2024
d6a970b
Fix `testCastValues()`.
terabytesoftw Mar 21, 2024
843368c
Fix tests `testCastValues()` for `mssql`, `mysql`.
terabytesoftw Mar 21, 2024
e7f233c
Revert remove `testVariadicConstructor()`, `testVariadicCallable()` i…
terabytesoftw Mar 21, 2024
4b12816
Fix `testVariadicConstructor` and `testVariadicCallable` in `Containe…
terabytesoftw Mar 21, 2024
3357e64
Remove test of data providers, and replace `expectNotToPerformAsserti…
terabytesoftw Mar 21, 2024
60f1df5
Merge branch 'master' into php-73.
terabytesoftw Mar 22, 2024
2f9c24e
Update CI workflows to disable fail-fast strategy.
terabytesoftw Mar 22, 2024
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
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ clone_folder: C:\projects\yii2

environment:
matrix:
- php_ver: 7.2.4
- php_ver: 7.3.0

cache:
- '%APPDATA%\Composer'
Expand All @@ -30,7 +30,7 @@ install:
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_pdo_sqlite.dll >> php.ini
- IF NOT EXIST C:\tools\composer.phar (cd C:\tools && appveyor DownloadFile https://getcomposer.org/download/1.4.1/composer.phar)
- IF NOT EXIST C:\tools\composer.phar (cd C:\tools && appveyor DownloadFile https://getcomposer.org/download/2.6.3/composer.phar)

before_test:
- cd C:\projects\yii2
Expand Down
53 changes: 10 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,58 +13,29 @@ concurrency:

jobs:
phpunit:
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
name: PHP ${{ matrix.php }}

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- php: 5.4
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 5.5
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 5.6
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.0
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.1
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.2
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.3
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
coverage: none
- php: 7.4
coverage: xdebug
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
coverage: xdebug
- php: 8.0
coverage: none
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.1
coverage: none
- php: 8.1
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
coverage: none
- php: 8.2
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
os: ubuntu-latest
- php: 8.3
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
Expand Down Expand Up @@ -96,18 +67,14 @@ jobs:
- name: Install dependencies.
run: composer update $DEFAULT_COMPOSER_FLAGS

- name: Run tests with PHPUnit.
if: matrix.php < '7.4' || matrix.php >= '8.1'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always

- name: Run tests with PHPUnit.
if: matrix.php == '8.0'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always

- name: Run tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --coverage-clover=coverage.xml --colors=always

- name: Run tests with PHPUnit.
if: matrix.php != '7.4'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v3
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- php: 7.4
Expand Down Expand Up @@ -68,13 +69,8 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run MSSQL tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --group mssql --coverage-clover=coverage.xml --colors=always

- name: Run MSSQL tests with PHPUnit.
if: matrix.php > '7.4'
run: vendor/bin/phpunit --group mssql --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v3
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
extensions: curl, intl, pdo, pdo_mysql
XDEBUG_MODE: coverage, develop

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
Expand Down Expand Up @@ -50,13 +51,8 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run MySQL tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --group mysql --coverage-clover=coverage.xml --colors=always

- name: Run MySQL tests with PHPUnit.
if: matrix.php > '7.4'
run: vendor/bin/phpunit --group mysql --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v3
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
extensions: curl, intl, pdo, pdo_pgsql
XDEBUG_MODE: coverage, develop

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
Expand Down Expand Up @@ -54,13 +55,8 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run Pgsql tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --group pgsql --coverage-clover=coverage.xml --colors=always

- name: Run Pgsql tests with PHPUnit.
if: matrix.php > '7.4'
run: vendor/bin/phpunit --group pgsql --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v3
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
Expand All @@ -43,13 +44,8 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run SQLite tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --group sqlite --coverage-clover=coverage.xml --colors=always

- name: Run SQLite tests with PHPUnit.
if: matrix.php > '7.4'
run: vendor/bin/phpunit --group sqlite --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build:

environment:
php:
version: 7.4.28
version: 8.1
ini:
xdebug.mode: coverage,develop
memory_limit: -1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ The framework is easy to adjust to meet your needs, because Yii has been designe
[![Latest Stable Version](https://img.shields.io/packagist/v/yiisoft/yii2.svg)](https://packagist.org/packages/yiisoft/yii2)
[![Total Downloads](https://img.shields.io/packagist/dt/yiisoft/yii2.svg)](https://packagist.org/packages/yiisoft/yii2)
[![Build Status](https://github.com/yiisoft/yii2/workflows/build/badge.svg)](https://github.com/yiisoft/yii2/actions)
[![Code Coverage](https://scrutinizer-ci.com/g/yiisoft/yii2/badges/coverage.png?s=31d80f1036099e9d6a3e4d7738f6b000b3c3d10e)](https://scrutinizer-ci.com/g/yiisoft/yii2/)
[![codecov](https://codecov.io/gh/yiisoft/yii2/graph/badge.svg?token=Exm6sRwhJ6)](https://codecov.io/gh/yiisoft/yii2)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/yiisoft/yii2/badges/quality-score.png?s=b1074a1ff6d0b214d54fa5ab7abbb90fc092471d)](https://scrutinizer-ci.com/g/yiisoft/yii2/)

Installation
------------

- The minimum required PHP version of Yii is PHP 5.4.
- The minimum required PHP version of Yii is PHP 7.3.
- It works best with PHP 8.
- [Follow the Definitive Guide](https://www.yiiframework.com/doc-2.0/guide-start-installation.html)
in order to get step by step instructions.
Expand Down
21 changes: 3 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"yiisoft/yii2": "self.version"
},
"require": {
"php": ">=5.4.0",
"php": ">=7.3.0",
"ext-mbstring": "*",
"ext-ctype": "*",
"lib-pcre": "*",
Expand All @@ -82,11 +82,10 @@
"paragonie/random_compat": ">=1"
},
"require-dev": {
"cweagans/composer-patches": "^1.7",
"phpunit/phpunit": "4.8.34",
"cebe/indent": "~1.0.2",
"johnkary/phpunit-speedtrap": "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"dms/phpunit-arraysubset-asserts": "^0.5",
"phpunit/phpunit": "^9.6",
"yiisoft/yii2-coding-standards": "^3.0"
},
"repositories": [
Expand Down Expand Up @@ -122,20 +121,6 @@
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
},
"composer-exit-on-patch-failure": true,
"patches": {
"phpunit/phpunit-mock-objects": {
"Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch"
},
"phpunit/php-file-iterator": {
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_path_file_iterator.patch"
},
"phpunit/phpunit": {
"Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch",
"Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch",
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch"
}
}
}
}
Loading
Loading