Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1860a9c

Browse files
Update cache in tests to use PSR-6
1 parent 69e422e commit 1860a9c

File tree

7 files changed

+13
-18
lines changed

7 files changed

+13
-18
lines changed

‎composer.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"doctrine/persistence": "<1.3"
1818
},
1919
"require-dev": {
20+
"cache/array-adapter": "^1.1",
2021
"composer/semver": "^3.3.2",
2122
"doctrine/annotations": "^1.11 || ^2.0",
2223
"doctrine/collections": "^1.6 || ^2.1",

‎tests/DoctrineIntegration/ODM/document-manager.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<?php declare(strict_types = 1);
22

3+
use Cache\Adapter\PHPArray\ArrayCachePool;
34
use Doctrine\Common\Annotations\AnnotationReader;
45
use Doctrine\ODM\MongoDB\Configuration;
56
use Doctrine\ODM\MongoDB\DocumentManager;
67
use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
7-
use Symfony\Component\Cache\Adapter\ArrayAdapter;
8-
use Symfony\Component\Cache\DoctrineProvider;
98

109
$config = new Configuration();
1110
$config->setProxyDir(__DIR__);
1211
$config->setProxyNamespace('PHPstan\Doctrine\OdmProxies');
13-
$config->setMetadataCacheImpl(new DoctrineProvider(newArrayAdapter()));
12+
$config->setMetadataCache(new ArrayCachePool());
1413
$config->setHydratorDir(__DIR__);
1514
$config->setHydratorNamespace('PHPstan\Doctrine\OdmHydrators');
1615

‎tests/DoctrineIntegration/ORM/entity-manager.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<?php declare(strict_types = 1);
22

3+
use Cache\Adapter\PHPArray\ArrayCachePool;
34
use Doctrine\Common\Annotations\AnnotationReader;
45
use Doctrine\ORM\Configuration;
56
use Doctrine\ORM\EntityManager;
67
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
7-
use Symfony\Component\Cache\Adapter\ArrayAdapter;
8-
use Symfony\Component\Cache\DoctrineProvider;
98

109
$config = new Configuration();
1110
$config->setProxyDir(__DIR__);
1211
$config->setProxyNamespace('PHPstan\Doctrine\OrmProxies');
13-
$config->setMetadataCacheImpl(new DoctrineProvider(newArrayAdapter()));
12+
$config->setMetadataCache(new ArrayCachePool());
1413

1514
$config->setMetadataDriverImpl(
1615
new AnnotationDriver(

‎tests/Rules/DeadCode/entity-manager.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<?php declare(strict_types = 1);
22

3+
use Cache\Adapter\PHPArray\ArrayCachePool;
34
use Doctrine\Common\Annotations\AnnotationReader;
45
use Doctrine\ORM\Configuration;
56
use Doctrine\ORM\EntityManager;
67
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
78
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
89
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
9-
use Symfony\Component\Cache\Adapter\ArrayAdapter;
10-
use Symfony\Component\Cache\DoctrineProvider;
1110

1211
$config = new Configuration();
1312
$config->setProxyDir(__DIR__);
1413
$config->setProxyNamespace('PHPstan\Doctrine\OrmProxies');
15-
$config->setMetadataCacheImpl(new DoctrineProvider(newArrayAdapter()));
14+
$config->setMetadataCache(new ArrayCachePool());
1615

1716
$metadataDriver = new MappingDriverChain();
1817
$metadataDriver->addDriver(new AnnotationDriver(

‎tests/Rules/Doctrine/ORM/entity-manager.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php declare(strict_types = 1);
22

3+
use Cache\Adapter\PHPArray\ArrayCachePool;
34
use Doctrine\Common\Annotations\AnnotationReader;
45
use Doctrine\DBAL\Types\DateTimeImmutableType;
56
use Doctrine\DBAL\Types\Type;
@@ -8,13 +9,11 @@
89
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
910
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
1011
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
11-
use Symfony\Component\Cache\Adapter\ArrayAdapter;
12-
use Symfony\Component\Cache\DoctrineProvider;
1312

1413
$config = new Configuration();
1514
$config->setProxyDir(__DIR__);
1615
$config->setProxyNamespace('PHPstan\Doctrine\OrmProxies');
17-
$config->setMetadataCacheImpl(new DoctrineProvider(newArrayAdapter()));
16+
$config->setMetadataCache(new ArrayCachePool());
1817

1918
$metadataDriver = new MappingDriverChain();
2019
$metadataDriver->addDriver(new AnnotationDriver(

‎tests/Rules/Properties/entity-manager.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<?php declare(strict_types = 1);
22

3+
use Cache\Adapter\PHPArray\ArrayCachePool;
34
use Doctrine\Common\Annotations\AnnotationReader;
45
use Doctrine\ORM\Configuration;
56
use Doctrine\ORM\EntityManager;
67
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
78
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
89
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
9-
use Symfony\Component\Cache\Adapter\ArrayAdapter;
10-
use Symfony\Component\Cache\DoctrineProvider;
1110

1211
$config = new Configuration();
1312
$config->setProxyDir(__DIR__);
1413
$config->setProxyNamespace('PHPstan\Doctrine\OrmProxies');
15-
$config->setMetadataCacheImpl(new DoctrineProvider(newArrayAdapter()));
14+
$config->setMetadataCache(new ArrayCachePool());
1615

1716
$metadataDriver = new MappingDriverChain();
1817
$metadataDriver->addDriver(new AnnotationDriver(

‎tests/Type/Doctrine/data/QueryResult/entity-manager.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<?php declare(strict_types = 1);
22

3+
use Cache\Adapter\PHPArray\ArrayCachePool;
34
use Doctrine\Common\Annotations\AnnotationReader;
45
use Doctrine\ORM\Configuration;
56
use Doctrine\ORM\EntityManager;
67
use Doctrine\ORM\Mapping\Column;
78
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
89
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
910
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
10-
use Symfony\Component\Cache\Adapter\ArrayAdapter;
11-
use Symfony\Component\Cache\DoctrineProvider;
1211

1312
$config = new Configuration();
1413
$config->setProxyDir(__DIR__);
1514
$config->setProxyNamespace('PHPstan\Doctrine\OrmProxies');
16-
$config->setMetadataCacheImpl(new DoctrineProvider(newArrayAdapter()));
15+
$config->setMetadataCache(new ArrayCachePool());
1716

1817
$metadataDriver = new MappingDriverChain();
1918

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /