diff --git a/.doctrine-project.json b/.doctrine-project.json index a08648bb182..3706f8616f8 100644 --- a/.doctrine-project.json +++ b/.doctrine-project.json @@ -6,8 +6,8 @@ "docsSlug": "doctrine-dbal", "versions": [ { - "name": "3.0", - "branchName": "3.0.x", + "name": "3.1", + "branchName": "3.1.x", "slug": "latest", "current": true, "aliases": [ @@ -15,10 +15,22 @@ "stable" ] }, + { + "name": "3.0", + "branchName": "3.0.x", + "slug": "3.0", + "maintained": false + }, + { + "name": "2.13", + "branchName": "2.13.x", + "slug": "2.13", + "current": true + }, { "name": "2.12", - "branchName": "2.12.x", - "slug": "2.12" + "slug": "2.12", + "maintained": false }, { "name": "2.11", diff --git a/README.md b/README.md index f936180712e..43caa5a5335 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Doctrine DBAL -| [4.0-dev][4.0] | [3.0][3.0] | [2.13][2.13] | +| [4.0-dev][4.0] | [3.1][3.1] | [2.13][2.13] | |:----------------:|:----------:|:----------:| -| [![GitHub Actions][GA 4.0 image]][GA 4.0] | [![GitHub Actions][GA 3.0 image]][GA 3.0] | [![GitHub Actions][GA 2.13 image]][GA 2.13] | -| [![AppVeyor][AppVeyor 4.0 image]][AppVeyor 4.0] | [![AppVeyor][AppVeyor 3.0 image]][AppVeyor 3.0] | [![AppVeyor][AppVeyor 2.13 image]][AppVeyor 2.13] | -| [![Code Coverage][Coverage image]][CodeCov 4.0] | [![Code Coverage][Coverage 3.0 image]][CodeCov 3.0] | [![Code Coverage][Coverage 2.13 image]][CodeCov 2.13] | +| [![GitHub Actions][GA 4.0 image]][GA 4.0] | [![GitHub Actions][GA 3.1 image]][GA 3.1] | [![GitHub Actions][GA 2.13 image]][GA 2.13] | +| [![AppVeyor][AppVeyor 4.0 image]][AppVeyor 4.0] | [![AppVeyor][AppVeyor 3.1 image]][AppVeyor 3.1] | [![AppVeyor][AppVeyor 2.13 image]][AppVeyor 2.13] | +| [![Code Coverage][Coverage image]][CodeCov 4.0] | [![Code Coverage][Coverage 3.1 image]][CodeCov 3.1] | [![Code Coverage][Coverage 2.13 image]][CodeCov 2.13] | | N/A | [![Code Coverage][TypeCov 3.1 image]][TypeCov 3.1] | N/A | Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction. @@ -23,13 +23,13 @@ Powerful database abstraction layer with many features for database schema intro [GA 4.0]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.0.x [GA 4.0 image]: https://github.com/doctrine/dbal/workflows/Continuous%20Integration/badge.svg - [Coverage 3.0 image]: https://codecov.io/gh/doctrine/dbal/branch/3.0.x/graph/badge.svg - [3.0]: https://github.com/doctrine/dbal/tree/3.0.x - [CodeCov 3.0]: https://codecov.io/gh/doctrine/dbal/branch/3.0.x - [AppVeyor 3.0]: https://ci.appveyor.com/project/doctrine/dbal/branch/3.0.x - [AppVeyor 3.0 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/3.0.x?svg=true - [GA 3.0]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A3.0.x - [GA 3.0 image]: https://github.com/doctrine/dbal/workflows/Continuous%20Integration/badge.svg?branch=3.0.x + [Coverage 3.1 image]: https://codecov.io/gh/doctrine/dbal/branch/3.1.x/graph/badge.svg + [3.1]: https://github.com/doctrine/dbal/tree/3.1.x + [CodeCov 3.1]: https://codecov.io/gh/doctrine/dbal/branch/3.1.x + [AppVeyor 3.1]: https://ci.appveyor.com/project/doctrine/dbal/branch/3.1.x + [AppVeyor 3.1 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/3.1.x?svg=true + [GA 3.1]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A3.1.x + [GA 3.1 image]: https://github.com/doctrine/dbal/workflows/Continuous%20Integration/badge.svg?branch=3.1.x [Coverage 2.13 image]: https://codecov.io/gh/doctrine/dbal/branch/2.13.x/graph/badge.svg [2.13]: https://github.com/doctrine/dbal/tree/2.13.x diff --git a/composer.json b/composer.json index cc17339657e..759a0a9624a 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "require": { "php": "^7.3 || ^8.0", "composer/package-versions-deprecated": "^1.11.99", - "doctrine/cache": "^1.11", + "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", "psr/cache": "^1|^2|^3" @@ -46,8 +46,8 @@ "phpunit/phpunit": "9.5.0", "psalm/plugin-phpunit": "0.13.0", "squizlabs/php_codesniffer": "3.6.0", - "symfony/cache": "^5.2", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "symfony/cache": "^5.2|^6.0", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0", "vimeo/psalm": "4.6.4" }, "suggest": { diff --git a/docs/en/reference/caching.rst b/docs/en/reference/caching.rst index cbb1413c33b..3a9ee383f55 100644 --- a/docs/en/reference/caching.rst +++ b/docs/en/reference/caching.rst @@ -45,4 +45,4 @@ result set is read (the easiest way to ensure this is to use one of the ``fetchA .. warning:: - When using the cache layer not all fetch modes are supported. See the code of the ``Doctrine\DBAL\Cache\ResultCacheStatement`` for details. + When using the cache layer not all fetch modes are supported. See the code of the ``Doctrine\DBAL\Cache\CachingResult`` for details. diff --git a/tests/Functional/ResultCacheTest.php b/tests/Functional/ResultCacheTest.php index e987a574301..93529226fd7 100644 --- a/tests/Functional/ResultCacheTest.php +++ b/tests/Functional/ResultCacheTest.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Tests\Functional; use Doctrine\Common\Cache\ArrayCache; +use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\Psr6\DoctrineProvider; use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\DBAL\Logging\DebugStack; @@ -415,7 +416,7 @@ public function testChangeCacheImplLegacy(): void return $result->fetchAssociative(); }); - $secondCache = new ArrayCache(); + $secondCache = $this->getArrayCache(); $stmt = $this->connection->executeQuery( 'SELECT * FROM caching WHERE test_int > 500', @@ -523,4 +524,11 @@ private function hydrateViaIteration(Result $result, callable $fetch): array return $data; } + + private function getArrayCache(): Cache + { + return DoctrineProvider::wrap(new ArrayAdapter()); + + self::fail('Cannot instantiate cache backend.'); + } }