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

Draft PHP 8.1 min. #19879

Merged
merged 27 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
10b02a8
Draft `PHP 8.0`.
terabytesoftw Jul 4, 2023
7353d3f
Raise PHP version `8.1`.
terabytesoftw Jul 5, 2023
65d513e
Fix workflow again.
terabytesoftw Jul 5, 2023
6d6ea0b
Fix tests ci-oracle.yml.
terabytesoftw Jul 5, 2023
835e584
Update workflows, `backupGlobals` phpunit `true`, update `composer.lo…
terabytesoftw Jul 5, 2023
c55e66b
Add `dms/phpunit-arraysubset-asserts` for support `assertArraySubset(…
terabytesoftw Jul 5, 2023
c7b9776
More fixed tests.
terabytesoftw Jul 5, 2023
16bfe3f
Separate workflow node and build.
terabytesoftw Jul 5, 2023
aa9d1f0
Fix `ci-node.yml`, `.appveyor.yml`, `.scrutinizer.yml`.
terabytesoftw Jul 5, 2023
4763a4a
Update `.appveyor.yml`.
terabytesoftw Jul 5, 2023
aad740a
Add `apc` tests.
terabytesoftw Jul 5, 2023
10f28a8
Add `--verbose` phpunit test.
terabytesoftw Jul 5, 2023
55d9f85
Fix `apc` caching tests.
terabytesoftw Jul 5, 2023
bb3fa7c
Fix tests again.
terabytesoftw Jul 5, 2023
7551799
Fix `apc` caching tests.
terabytesoftw Jul 5, 2023
a291e10
Remove `Object::class` deprecated.
terabytesoftw Jul 5, 2023
082d5bc
Remove conditional php version.
terabytesoftw Jul 5, 2023
3da77ac
Test build-node with Jquery `3.6.*@stable`.
terabytesoftw Jul 5, 2023
31f6223
Update workflow ci-node.yml.
terabytesoftw Jul 6, 2023
baaa899
Add `mssql` to code coverage.
terabytesoftw Jul 6, 2023
10198f2
No cancel jobs in `refs/heads/master`.
terabytesoftw Jul 6, 2023
7fb7dfb
Apply fixed review.
terabytesoftw Jul 7, 2023
a9157e8
Remove install php in `ci-node.yml`.
terabytesoftw Jul 7, 2023
c9fc0b7
Update workflows.
terabytesoftw Jul 10, 2023
8ddee28
Merge branch '2.2' into draft-php-80-min
terabytesoftw Jul 10, 2023
cbcc070
Remove unnecesary files.
terabytesoftw Jul 10, 2023
43e0fa8
use ExpectExceptionMessageMatches.
terabytesoftw Jul 10, 2023
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
6 changes: 3 additions & 3 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: 8.1.20

cache:
- '%APPDATA%\Composer'
Expand All @@ -30,12 +30,12 @@ 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.5.8/composer.phar)

before_test:
- cd C:\projects\yii2
- php C:\tools\composer.phar update --no-interaction --no-progress --prefer-stable --no-ansi

test_script:
- cd C:\projects\yii2
- vendor\bin\phpunit --exclude-group mssql,mysql,pgsql,sqlite,db,oci,wincache,xcache,zenddata,cubrid
- vendor\bin\phpunit --exclude-group db,wincache,xcache,zenddata
68 changes: 11 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: [push, pull_request]

env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
EXTENSIONS: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached, pdo, pdo_sqlite, sqlite
PHPUNIT_EXCLUDE_GROUP: db,wincache,xcache,zenddata
XDEBUG_MODE: coverage, develop

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -20,51 +20,8 @@ jobs:
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
- php: 7.4
coverage: xdebug
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.0
coverage: none
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.1
coverage: none
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.2
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
os: ubuntu-latest
os: [ubuntu-latest]
php: [8.1, 8.2]

steps:
- name: Generate french locale.
Expand All @@ -76,8 +33,8 @@ jobs:
- name: Install PHP.
uses: shivammathur/setup-php@v2
with:
coverage: ${{ matrix.coverage }}
extensions: ${{ matrix.extensions }}
coverage: pcov
extensions: ${{ env.EXTENSIONS }}
ini-values: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC', session.save_path="${{ runner.temp }}"
php-version: ${{ matrix.php }}
tools: pecl
Expand All @@ -88,20 +45,17 @@ 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 and generate coverage.
if: matrix.php == '8.1'
run: vendor/bin/phpunit --coverage-clover=coverage.xml --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always --verbose

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

- 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: Upload coverage to Codecov.
if: matrix.php == '7.4'
if: matrix.php == '8.1'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
43 changes: 22 additions & 21 deletions .github/workflows/ci-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ jobs:
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}

env:
EXTENSIONS: pdo, pdo_sqlsrv
XDEBUG_MODE: coverage, develop
EXTENSIONS: pdo, pdo_sqlsrv-5.10.1

runs-on: ubuntu-latest

strategy:
matrix:
include:
- php: 7.4
mssql: server:2017-latest
- php: 8.0
mssql: server:2019-latest
- php: 8.1
mssql: server:2019-latest
- php: 8.2
mssql: server:2022-latest
matrix:
os:
- ubuntu-latest

php:
- 8.1
- 8.2

mssql:
- server:2017-latest
- server:2019-latest
- server:2022-latest

services:
mssql:
Expand All @@ -42,37 +43,37 @@ jobs:
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3

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

- name: Create MS SQL Database
- name: Create MS SQL Database.
run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Install PHP with extensions
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
coverage: pcov
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
php-version: ${{ matrix.php }}
tools: composer:v2, pecl

- name: Update composer
- name: Update composer.
run: composer self-update

- name: Install dependencies with composer
- name: Install dependencies with composer.
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'
if: matrix.php == '8.1'
run: vendor/bin/phpunit --group mssql --coverage-clover=coverage.xml --colors=always

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

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
if: matrix.php == '8.1'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
14 changes: 6 additions & 8 deletions .github/workflows/ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
tests:
name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql }}
env:
extensions: curl, intl, pdo, pdo_mysql
XDEBUG_MODE: coverage, develop
EXTENSIONS: curl, intl, pdo, pdo_mysql

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

Expand All @@ -23,8 +22,6 @@ jobs:
- ubuntu-latest

php:
- 7.4
- 8.0
- 8.1
- 8.2

Expand All @@ -49,7 +46,7 @@ jobs:
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
coverage: pcov
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
php-version: ${{ matrix.php }}
Expand All @@ -59,15 +56,16 @@ 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'
if: matrix.php == '8.1'
run: vendor/bin/phpunit --group mysql --coverage-clover=coverage.xml --colors=always

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

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
if: matrix.php == '8.1'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml

23 changes: 11 additions & 12 deletions .github/workflows/ci-oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ concurrency:

jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
name: PHP ${{ matrix.php }}-oracle-11g-r2

env:
extensions: oci8, pdo, pdo_oci
XDEBUG_MODE: coverage, develop
EXTENSIONS: oci8, pdo, pdo_oci

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

Expand All @@ -24,14 +23,17 @@ jobs:
- ubuntu-latest

php:
- 7.4
- 8.1

oracle:
- 11

services:
oci:
image: wnameless/oracle-xe-11g-r2:latest
ports:
- 1521:1521
options: --name=oci
image: wnameless/oracle-xe-11g-r2:latest
ports:
- 1521:1521
options: --name=oci

steps:
- name: Checkout.
Expand All @@ -40,15 +42,12 @@ jobs:
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
coverage: pcov
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
php-version: ${{ matrix.php }}
tools: composer:v2, pecl

- name: Update composer.
run: composer self-update

- name: Install dependencies with composer.
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/ci-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
tests:
name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql }}
env:
extensions: curl, intl, pdo, pdo_pgsql
XDEBUG_MODE: coverage, develop
EXTENSIONS: curl, intl, pdo, pdo_pgsql

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

Expand All @@ -23,9 +22,8 @@ jobs:
- ubuntu-latest

php:
- 7.4
- 8.0
- 8.1
- 8.2

pgsql:
- 10
Expand All @@ -50,31 +48,28 @@ jobs:
- name: Checkout.
uses: actions/checkout@v3

- name: Install PHP with extensions
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
coverage: pcov
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
php-version: ${{ matrix.php }}
tools: composer:v2, pecl

- name: Update composer.
run: composer self-update

- name: Install dependencies with composer.
- name: Install dependencies with composer
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'
if: matrix.php == '8.1'
run: vendor/bin/phpunit --group pgsql --coverage-clover=coverage.xml --colors=always

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

- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
if: matrix.php == '8.1'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Loading