From ce4b713ba929b70841a53c62d602f0198fef1d89 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sun, 30 Nov 2025 11:42:07 +0300 Subject: [PATCH 1/2] PHP 8.5 support --- .github/workflows/ansi-mode.yml | 2 +- .github/workflows/build-mariadb.yml | 4 +++- .github/workflows/build.yml | 4 +++- .github/workflows/composer-require-checker.yml | 2 +- .github/workflows/mutation.yml | 2 +- .github/workflows/rector-cs.yml | 2 +- CHANGELOG.md | 2 +- README.md | 2 +- composer.json | 14 ++++++++++---- tools/.gitignore | 2 ++ tools/infection/composer.json | 10 ++++++++++ tools/psalm/composer.json | 5 +++++ 12 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 tools/.gitignore create mode 100644 tools/infection/composer.json create mode 100644 tools/psalm/composer.json diff --git a/.github/workflows/ansi-mode.yml b/.github/workflows/ansi-mode.yml index 413224cc..ffe57700 100644 --- a/.github/workflows/ansi-mode.yml +++ b/.github/workflows/ansi-mode.yml @@ -38,7 +38,7 @@ jobs: - ubuntu-latest php: - - 8.4 + - 8.5 mysql: - mysql:latest diff --git a/.github/workflows/build-mariadb.yml b/.github/workflows/build-mariadb.yml index e89d9ba3..49fde891 100644 --- a/.github/workflows/build-mariadb.yml +++ b/.github/workflows/build-mariadb.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: php: - - 8.4 + - 8.5 mariadb: - mariadb:10.4 @@ -54,6 +54,8 @@ jobs: mariadb: mariadb:latest - php: 8.3 mariadb: mariadb:latest + - php: 8.4 + mariadb: mariadb:latest services: mysql: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87fec5d0..3d16dad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: strategy: matrix: php: - - 8.4 + - 8.5 mysql: - mysql:5.7 @@ -48,6 +48,8 @@ jobs: mysql: mysql:latest - php: 8.3 mysql: mysql:latest + - php: 8.4 + mysql: mysql:latest services: mysql: diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 1face1f2..2f8aece6 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -25,6 +25,6 @@ jobs: uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master with: php: >- - ['8.1', '8.2', '8.3', '8.4'] + ['8.1', '8.2', '8.3', '8.4', '8.5'] required-packages: >- ['db'] diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index c65d1c14..5763db2a 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -34,7 +34,7 @@ jobs: - ubuntu-latest php: - - 8.4 + - 8.5 services: mysql: diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index 3c670a95..d6a42ee5 100644 --- a/.github/workflows/rector-cs.yml +++ b/.github/workflows/rector-cs.yml @@ -24,6 +24,6 @@ jobs: token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: repository: ${{ github.event.pull_request.head.repo.full_name }} - php: '8.4' + php: '8.5' required-packages: >- ['db'] diff --git a/CHANGELOG.md b/CHANGELOG.md index 91a31a12..e56ddf1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ - New #374: Add `IndexType` and `IndexMethod` classes (@Tigrov) - Enh #376: Move `JsonExpressionBuilder` and JSON type tests to `yiisoft/db` package (@Tigrov) - Bug #377: Explicitly mark nullable parameters (@vjik) -- Chg #378: Change supported PHP versions to `8.1 - 8.4` (@Tigrov) +- Chg #378, #451: Change supported PHP versions to `8.1 - 8.5` (@Tigrov, @vjik) - Enh #378: Minor refactoring (@Tigrov) - New #379: Add parameters `$ifExists` and `$cascade` to `CommandInterface::dropTable()` and `DDLQueryBuilderInterface::dropTable()` methods (@vjik) diff --git a/README.md b/README.md index 258a52e2..d2ec0568 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Driver supports MySQL 5.7 or higher, and MariaDB 10.4 or higher. ## Requirements -- PHP 8.1 - 8.4. +- PHP 8.1 - 8.5. - `pdo_mysql` PHP extension. - `ctype` PHP extension. diff --git a/composer.json b/composer.json index 77963fce..75ff6f84 100644 --- a/composer.json +++ b/composer.json @@ -31,20 +31,19 @@ } ], "require": { - "php": "8.1 - 8.4", + "php": "8.1 - 8.5", "ext-ctype": "*", "ext-pdo": "*", "psr/log": "^2.0|^3.0", "yiisoft/db": "dev-master" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.3", "friendsofphp/php-cs-fixer": "^3.89.1", "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.8.8", "vlucas/phpdotenv": "^5.6.1", "yiisoft/aliases": "^2.0", "yiisoft/log-target-file": "^2.0.1", @@ -67,10 +66,17 @@ }, "files": ["tests/bootstrap.php"] }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "target-directory": "tools", + "forward-command": true + } + }, "config": { "sort-packages": true, "allow-plugins": { - "infection/extension-installer": true, + "bamarni/composer-bin-plugin": true, "composer/package-versions-deprecated": true } }, diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 00000000..cf452dcf --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1,2 @@ +/*/vendor +/*/composer.lock diff --git a/tools/infection/composer.json b/tools/infection/composer.json new file mode 100644 index 00000000..18be2ea1 --- /dev/null +++ b/tools/infection/composer.json @@ -0,0 +1,10 @@ +{ + "require-dev": { + "infection/infection": "^0.26 || ^0.31.9" + }, + "config": { + "allow-plugins": { + "infection/extension-installer": true + } + } +} diff --git a/tools/psalm/composer.json b/tools/psalm/composer.json new file mode 100644 index 00000000..44e11e3e --- /dev/null +++ b/tools/psalm/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "vimeo/psalm": "^5.26.1 || ^6.8.8" + } +} From d5a6bcb9bc384b184c8ad79d096a0ade70328202 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sun, 30 Nov 2025 16:26:29 +0300 Subject: [PATCH 2/2] fix --- .github/workflows/mutation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 5763db2a..4e370a94 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -59,8 +59,8 @@ jobs: ini-values: memory_limit=-1 coverage: pcov - - name: Update composer. - run: composer self-update + - name: Install Composer dependencies + uses: ramsey/composer-install@v3 - name: Install db. uses: yiisoft/actions/install-packages@master