Skip to content

Commit

Permalink
Merge branch '3.1.x' into 3.2.x
Browse files Browse the repository at this point in the history
* 3.1.x:
  Support Doctrine Cache 2
  Display metrics of 3.1 instead of 3.0
  [doctrineGH-4613] Use utf8mb4 instead of utf8 for testing connection charset
  • Loading branch information
derrabus committed May 2, 2021
2 parents e026b54 + 3ebe5d7 commit 3da4583
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 9 additions & 3 deletions tests/Functional/ResultCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

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;
use Doctrine\DBAL\Result;
Expand Down Expand Up @@ -233,7 +234,7 @@ public function testFetchingAllRowsSavesCache(callable $fetchAll): void
*/
public function testFetchingAllRowsSavesCacheLegacy(callable $fetchAll): void
{
$layerCache = new ArrayCache();
$layerCache = $this->getArrayCache();

$result = $this->connection->executeQuery(
'SELECT * FROM caching WHERE test_int > 500',
Expand Down Expand Up @@ -385,7 +386,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',
Expand Down Expand Up @@ -462,4 +463,9 @@ private function hydrateViaIteration(Result $result, callable $fetch): array

return $data;
}

private function getArrayCache(): Cache
{
return DoctrineProvider::wrap(new ArrayAdapter());
}
}

0 comments on commit 3da4583

Please sign in to comment.