From c88b3e70b17c272ca92b850a2d6f747123b49eec Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Wed, 10 Dec 2025 17:14:37 +0300 Subject: [PATCH 1/3] PHP 8.5 support --- .github/workflows/composer-require-checker.yml | 2 +- .github/workflows/mssql.yml | 1 + .github/workflows/mutation.yml | 2 +- .github/workflows/mysql.yml | 1 + .github/workflows/oracle.yml | 1 + .github/workflows/pgsql.yml | 2 ++ .github/workflows/rector-cs.yml | 2 +- .github/workflows/sqlite.yml | 1 + .github/workflows/static.yml | 2 +- README.md | 2 +- composer.json | 2 +- 11 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 25e9f02..72fa260 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -32,6 +32,6 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3', '8.4'] + ['8.1', '8.2', '8.3', '8.4', '8.5'] required-packages: >- ['data'] diff --git a/.github/workflows/mssql.yml b/.github/workflows/mssql.yml index 5403034..79f625c 100644 --- a/.github/workflows/mssql.yml +++ b/.github/workflows/mssql.yml @@ -34,6 +34,7 @@ jobs: - 8.2 - 8.3 - 8.4 + - 8.5 mssql: - server: 2022-latest diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 86d21df..fc0cf71 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -29,7 +29,7 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.3'] + ['8.5'] required-packages: >- ['data'] secrets: diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 254c29a..6fd34ce 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -41,6 +41,7 @@ jobs: - 8.2 - 8.3 - 8.4 + - 8.5 mysql: - 5.7 diff --git a/.github/workflows/oracle.yml b/.github/workflows/oracle.yml index 41fd919..382f6b4 100644 --- a/.github/workflows/oracle.yml +++ b/.github/workflows/oracle.yml @@ -42,6 +42,7 @@ jobs: - 8.2 - 8.3 - 8.4 + - 8.5 oracle: - 18 diff --git a/.github/workflows/pgsql.yml b/.github/workflows/pgsql.yml index 498d084..0fe8413 100644 --- a/.github/workflows/pgsql.yml +++ b/.github/workflows/pgsql.yml @@ -41,6 +41,7 @@ jobs: - 8.2 - 8.3 - 8.4 + - 8.5 pgsql: - 9 @@ -52,6 +53,7 @@ jobs: - 15 - 16 - 17 + - 18 services: postgres: diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index 523e9ed..b15c5e3 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.1' required-packages: >- ['data'] diff --git a/.github/workflows/sqlite.yml b/.github/workflows/sqlite.yml index d8b9364..48b9918 100644 --- a/.github/workflows/sqlite.yml +++ b/.github/workflows/sqlite.yml @@ -38,6 +38,7 @@ jobs: - 8.2 - 8.3 - 8.4 + - 8.5 steps: - name: Checkout. diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index ba7b0ff..79e38dd 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -30,6 +30,6 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3', '8.4'] + ['8.1', '8.2', '8.3', '8.4', '8.5'] required-packages: >- ['data'] diff --git a/README.md b/README.md index be6fe79..93ed024 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Detailed build statuses: ## Requirements -- PHP 8.1 or higher. +- PHP 8.1 - 8.5. ## Installation diff --git a/composer.json b/composer.json index 9043049..8e9f23b 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "8.1 - 8.4", + "php": "8.1 - 8.5", "yiisoft/data": "dev-master", "yiisoft/db": "^2.0" }, From d5eeb402032e3637566fe505f445a9e2126dc935 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Wed, 10 Dec 2025 17:29:54 +0300 Subject: [PATCH 2/3] fix --- composer.json | 2 +- tests/Mssql/DatabaseTrait.php | 4 ++-- tests/Mysql/DatabaseTrait.php | 4 ++-- tests/Oracle/DatabaseTrait.php | 4 ++-- tests/Pgsql/DatabaseTrait.php | 4 ++-- tests/Sqlite/DatabaseTrait.php | 4 ++-- tests/TestHelper.php | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 8e9f23b..44026cb 100644 --- a/composer.json +++ b/composer.json @@ -43,12 +43,12 @@ "spatie/phpunit-watcher": "^1.24", "vimeo/psalm": "^5.26.1 || ^6.9.1", "vlucas/phpdotenv": "^5.6.2", - "yiisoft/cache": "^3.1", "yiisoft/db-mssql": "^2.0", "yiisoft/db-mysql": "^2.0", "yiisoft/db-oracle": "^2.0", "yiisoft/db-pgsql": "^2.0", "yiisoft/db-sqlite": "^2.0", + "yiisoft/psr-dummy-provider": "^1.0.2", "yiisoft/test-support": "^3.0" }, "autoload": { diff --git a/tests/Mssql/DatabaseTrait.php b/tests/Mssql/DatabaseTrait.php index e2ee9d2..3d4808d 100644 --- a/tests/Mssql/DatabaseTrait.php +++ b/tests/Mssql/DatabaseTrait.php @@ -4,12 +4,12 @@ namespace Yiisoft\Data\Db\Tests\Mssql; -use Yiisoft\Cache\ArrayCache; use Yiisoft\Data\Db\Tests\TestHelper; use Yiisoft\Db\Cache\SchemaCache; use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface; use Yiisoft\Db\Mssql\Connection; use Yiisoft\Db\Mssql\Driver; +use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache; trait DatabaseTrait { @@ -28,7 +28,7 @@ protected function makeConnection(): PdoConnectionInterface ); $pdoDriver->charset('UTF8MB4'); - $db = new Connection($pdoDriver, new SchemaCache(new ArrayCache())); + $db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache())); TestHelper::loadFixtures($db); diff --git a/tests/Mysql/DatabaseTrait.php b/tests/Mysql/DatabaseTrait.php index 73c10de..2319ad0 100644 --- a/tests/Mysql/DatabaseTrait.php +++ b/tests/Mysql/DatabaseTrait.php @@ -4,12 +4,12 @@ namespace Yiisoft\Data\Db\Tests\Mysql; -use Yiisoft\Cache\ArrayCache; use Yiisoft\Data\Db\Tests\TestHelper; use Yiisoft\Db\Cache\SchemaCache; use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface; use Yiisoft\Db\Mysql\Connection; use Yiisoft\Db\Mysql\Driver; +use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache; trait DatabaseTrait { @@ -24,7 +24,7 @@ protected function makeConnection(): PdoConnectionInterface $pdoDriver = new Driver("mysql:host=$host;dbname=$database;port=$port", $user, $password); $pdoDriver->charset('UTF8MB4'); - $db = new Connection($pdoDriver, new SchemaCache(new ArrayCache())); + $db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache())); TestHelper::loadFixtures($db); diff --git a/tests/Oracle/DatabaseTrait.php b/tests/Oracle/DatabaseTrait.php index 1503343..76145d5 100644 --- a/tests/Oracle/DatabaseTrait.php +++ b/tests/Oracle/DatabaseTrait.php @@ -5,12 +5,12 @@ namespace Yiisoft\Data\Db\Tests\Oracle; use PDO; -use Yiisoft\Cache\ArrayCache; use Yiisoft\Data\Db\Tests\TestHelper; use Yiisoft\Db\Cache\SchemaCache; use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface; use Yiisoft\Db\Oracle\Connection; use Yiisoft\Db\Oracle\Driver; +use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache; trait DatabaseTrait { @@ -26,7 +26,7 @@ protected function makeConnection(): PdoConnectionInterface $pdoDriver->charset('AL32UTF8'); $pdoDriver->attributes([PDO::ATTR_STRINGIFY_FETCHES => true]); - $db = new Connection($pdoDriver, new SchemaCache(new ArrayCache())); + $db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache())); TestHelper::loadFixtures($db); diff --git a/tests/Pgsql/DatabaseTrait.php b/tests/Pgsql/DatabaseTrait.php index 7f94abf..7a7623b 100644 --- a/tests/Pgsql/DatabaseTrait.php +++ b/tests/Pgsql/DatabaseTrait.php @@ -4,12 +4,12 @@ namespace Yiisoft\Data\Db\Tests\Pgsql; -use Yiisoft\Cache\ArrayCache; use Yiisoft\Data\Db\Tests\TestHelper; use Yiisoft\Db\Cache\SchemaCache; use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface; use Yiisoft\Db\Pgsql\Connection; use Yiisoft\Db\Pgsql\Driver; +use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache; trait DatabaseTrait { @@ -24,7 +24,7 @@ protected function makeConnection(): PdoConnectionInterface $pdoDriver = new Driver("pgsql:host=$host;dbname=$database;port=$port", $user, $password); $pdoDriver->charset('UTF8'); - $db = new Connection($pdoDriver, new SchemaCache(new ArrayCache())); + $db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache())); TestHelper::loadFixtures($db); diff --git a/tests/Sqlite/DatabaseTrait.php b/tests/Sqlite/DatabaseTrait.php index 3eaa8ef..e95c488 100644 --- a/tests/Sqlite/DatabaseTrait.php +++ b/tests/Sqlite/DatabaseTrait.php @@ -4,11 +4,11 @@ namespace Yiisoft\Data\Db\Tests\Sqlite; -use Yiisoft\Cache\ArrayCache; use Yiisoft\Data\Db\Tests\TestHelper; use Yiisoft\Db\Cache\SchemaCache; use Yiisoft\Db\Sqlite\Connection; use Yiisoft\Db\Sqlite\Driver; +use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache; trait DatabaseTrait { @@ -16,7 +16,7 @@ protected function makeConnection(): Connection { $db = new Connection( new Driver('sqlite::memory:'), - new SchemaCache(new ArrayCache()), + new SchemaCache(new MemorySimpleCache()), ); TestHelper::loadFixtures($db); return $db; diff --git a/tests/TestHelper.php b/tests/TestHelper.php index 07da9c0..8ced12c 100644 --- a/tests/TestHelper.php +++ b/tests/TestHelper.php @@ -4,7 +4,6 @@ namespace Yiisoft\Data\Db\Tests; -use Yiisoft\Cache\NullCache; use Yiisoft\Data\Db\FieldMapper\ArrayFieldMapper; use Yiisoft\Data\Db\FilterHandler; use Yiisoft\Data\Db\FilterHandler\AllHandler; @@ -30,6 +29,7 @@ use Yiisoft\Db\Schema\Column\ColumnBuilder; use Yiisoft\Db\Sqlite\Connection; use Yiisoft\Db\Sqlite\Driver; +use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache; final class TestHelper { @@ -37,7 +37,7 @@ public static function createSqliteConnection(): Connection { return new Connection( new Driver('sqlite::memory:'), - new SchemaCache(new NullCache()), + new SchemaCache(new MemorySimpleCache()), ); } From 487a84e15c8c715b7786830cd1b70492608bf60d Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 12 Dec 2025 10:46:50 +0300 Subject: [PATCH 3/3] fix --- .github/workflows/static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 79e38dd..ba7b0ff 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -30,6 +30,6 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3', '8.4', '8.5'] + ['8.1', '8.2', '8.3', '8.4'] required-packages: >- ['data']