From 2685d09a5aff8ef117ba3de3476e6a4ab1a4d54f Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 18 Mar 2025 09:47:58 +0300 Subject: [PATCH 1/5] PHP 8.4 support --- .github/workflows/bc.yml_ | 38 ++++++++++++++----- .../workflows/composer-require-checker.yml | 2 +- .github/workflows/mssql.yml | 1 + .github/workflows/mysql.yml | 1 + .github/workflows/oracle.yml | 1 + .github/workflows/pgsql.yml | 4 ++ .github/workflows/rector.yml | 5 ++- .github/workflows/sqlite.yml | 2 + .github/workflows/static.yml | 2 +- composer.json | 16 ++++---- psalm.xml | 6 +-- 11 files changed, 51 insertions(+), 27 deletions(-) diff --git a/.github/workflows/bc.yml_ b/.github/workflows/bc.yml_ index 75f97a7..00041a9 100644 --- a/.github/workflows/bc.yml_ +++ b/.github/workflows/bc.yml_ @@ -1,15 +1,33 @@ on: - - pull_request - - push + pull_request: + paths-ignore: + - 'docs/**' + - 'README.md' + - 'CHANGELOG.md' + - '.gitignore' + - '.gitattributes' + - 'infection.json.dist' + - 'phpunit.xml.dist' + - 'psalm.xml' + push: + branches: ['master'] + paths-ignore: + - 'docs/**' + - 'README.md' + - 'CHANGELOG.md' + - '.gitignore' + - '.gitattributes' + - 'infection.json.dist' + - 'phpunit.xml.dist' + - 'psalm.xml' name: backwards compatibility + jobs: roave_bc_check: - name: Roave BC Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: fetch tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga + uses: yiisoft/actions/.github/workflows/bc.yml@master + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.1'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 822591f..919a073 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -32,4 +32,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3'] + ['8.1', '8.2', '8.3', '8.4'] diff --git a/.github/workflows/mssql.yml b/.github/workflows/mssql.yml index 4341cea..943ea13 100644 --- a/.github/workflows/mssql.yml +++ b/.github/workflows/mssql.yml @@ -33,6 +33,7 @@ jobs: - 8.1 - 8.2 - 8.3 + - 8.4 mssql: - server: 2022-latest diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 1532550..03df2b0 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -40,6 +40,7 @@ jobs: - 8.1 - 8.2 - 8.3 + - 8.4 mysql: - 5.7 diff --git a/.github/workflows/oracle.yml b/.github/workflows/oracle.yml index d20e05f..737370d 100644 --- a/.github/workflows/oracle.yml +++ b/.github/workflows/oracle.yml @@ -40,6 +40,7 @@ jobs: - 8.1 - 8.2 - 8.3 + - 8.4 oracle: - 18 diff --git a/.github/workflows/pgsql.yml b/.github/workflows/pgsql.yml index a9dbea6..4836ce2 100644 --- a/.github/workflows/pgsql.yml +++ b/.github/workflows/pgsql.yml @@ -40,6 +40,7 @@ jobs: - 8.1 - 8.2 - 8.3 + - 8.4 pgsql: - 9 @@ -48,6 +49,9 @@ jobs: - 12 - 13 - 14 + - 15 + - 16 + - 17 services: postgres: diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 35411d0..5d6931d 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -1,5 +1,5 @@ on: - pull_request: + pull_request_target: paths-ignore: - 'docs/**' - 'README.md' @@ -17,7 +17,8 @@ jobs: secrets: token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: + repository: ${{ github.event.pull_request.head.repo.full_name }} os: >- ['ubuntu-latest'] php: >- - ['8.3'] + ['8.4'] diff --git a/.github/workflows/sqlite.yml b/.github/workflows/sqlite.yml index b7ccab6..8c97475 100644 --- a/.github/workflows/sqlite.yml +++ b/.github/workflows/sqlite.yml @@ -10,6 +10,7 @@ on: - 'psalm.xml' push: + branches: ['master'] paths-ignore: - 'docs/**' - 'README.md' @@ -36,6 +37,7 @@ jobs: - 8.1 - 8.2 - 8.3 + - 8.4 steps: - name: Checkout. diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 873eeb5..9e12684 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -30,4 +30,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3'] + ['8.1', '8.2', '8.3', '8.4'] diff --git a/composer.json b/composer.json index 5f2ba16..77acde3 100644 --- a/composer.json +++ b/composer.json @@ -30,18 +30,18 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^8.1", + "php": "8.1 - 8.4", "yiisoft/data": "dev-master", "yiisoft/db": "^1.3" }, "require-dev": { - "maglnet/composer-require-checker": "^4.2", - "phpunit/phpunit": "^10.5", - "rector/rector": "^2.0", - "roave/infection-static-analysis-plugin": "^1.16", - "spatie/phpunit-watcher": "^1.23", - "vimeo/psalm": "^5.21", - "vlucas/phpdotenv": "^5.6", + "maglnet/composer-require-checker": "^4.7.1", + "phpunit/phpunit": "^10.5.45", + "rector/rector": "^2.0.10", + "roave/infection-static-analysis-plugin": "^1.35", + "spatie/phpunit-watcher": "^1.24", + "vimeo/psalm": "^5.26.1 || ^6.9.1", + "vlucas/phpdotenv": "^5.6.1", "yiisoft/cache": "^3.0", "yiisoft/db-mssql": "^1.2", "yiisoft/db-mysql": "^1.2", diff --git a/psalm.xml b/psalm.xml index 313388b..2b2e0b2 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,6 +3,7 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" + ensureOverrideAttribute="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" @@ -16,10 +17,5 @@ - - - - - From 226ced22b3e3a061f7eb1a69bd725ae2a3d15b83 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 18 Mar 2025 09:50:46 +0300 Subject: [PATCH 2/5] fix --- .github/workflows/oracle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/oracle.yml b/.github/workflows/oracle.yml index 737370d..c449e8d 100644 --- a/.github/workflows/oracle.yml +++ b/.github/workflows/oracle.yml @@ -10,6 +10,7 @@ on: - 'psalm.xml' push: + branches: ['master'] paths-ignore: - 'docs/**' - 'README.md' From d12f9c98db1f8cd913fca2efde3525972ba9c468 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 18 Mar 2025 10:09:48 +0300 Subject: [PATCH 3/5] improve --- phpunit.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 06dc913..16e2851 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -12,6 +12,7 @@ failOnWarning="true" stopOnFailure="false" colors="true" + displayDetailsOnPhpunitDeprecations="true" > From 33410603dd095a1a414e11d23cadce59e38b9e7f Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 18 Mar 2025 10:16:30 +0300 Subject: [PATCH 4/5] test --- .github/workflows/sqlite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlite.yml b/.github/workflows/sqlite.yml index 8c97475..74f4c89 100644 --- a/.github/workflows/sqlite.yml +++ b/.github/workflows/sqlite.yml @@ -74,7 +74,7 @@ jobs: run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - name: Run tests with phpunit with code coverage. - run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always --configuration phpunit.xml.dist + run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always --configuration phpunit.xml.dist --display-deprecations - name: Upload coverage to Codecov. if: matrix.os == 'ubuntu-latest' From 627053b74672e60b9a7d4ff07617b3c2e3fb8005 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 18 Mar 2025 10:18:58 +0300 Subject: [PATCH 5/5] revert --- .github/workflows/sqlite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlite.yml b/.github/workflows/sqlite.yml index 74f4c89..8c97475 100644 --- a/.github/workflows/sqlite.yml +++ b/.github/workflows/sqlite.yml @@ -74,7 +74,7 @@ jobs: run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - name: Run tests with phpunit with code coverage. - run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always --configuration phpunit.xml.dist --display-deprecations + run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always --configuration phpunit.xml.dist - name: Upload coverage to Codecov. if: matrix.os == 'ubuntu-latest'