|
65 | 65 |
|
66 | 66 | class DoctrineExtensionTest extends TestCase |
67 | 67 | { |
68 | | - /** |
69 | | - * https://github.com/doctrine/orm/pull/7953 needed, otherwise ORM classes |
70 | | - * we define services for trigger deprecations |
71 | | - */ |
72 | | - #[IgnoreDeprecations] |
73 | 68 | public function testAutowiringAlias(): void |
74 | 69 | { |
75 | 70 | if (! interface_exists(EntityManagerInterface::class)) { |
@@ -505,6 +500,7 @@ public function testDependencyInjectionConfigurationDefaults(): void |
505 | 500 | $this->assertSame(ArrayAdapter::class, $definition->getClass()); |
506 | 501 | } |
507 | 502 |
|
| 503 | + #[IgnoreDeprecations] |
508 | 504 | public function testUseSavePointsAddMethodCallToAddSavepointsToTheConnection(): void |
509 | 505 | { |
510 | 506 | $container = $this->getContainer(); |
@@ -929,51 +925,6 @@ public function testCacheConfiguration(string $expectedAliasName, string $expect |
929 | 925 | $this->assertEquals($expectedTarget, (string) $alias); |
930 | 926 | } |
931 | 927 |
|
932 | | - /** @param array{type: ?string, pool?: string, id?: string} $cacheConfig */ |
933 | | - #[DataProvider('legacyCacheConfigurationProvider')] |
934 | | - #[IgnoreDeprecations] |
935 | | - public function testLegacyCacheConfiguration(string $expectedAliasName, string $expectedAliasTarget, string $cacheName, array $cacheConfig): void |
936 | | - { |
937 | | - $this->testCacheConfiguration($expectedAliasName, $expectedAliasTarget, $cacheName, $cacheConfig); |
938 | | - } |
939 | | - |
940 | | - /** @return array<string, array{expectedAliasName: string, expectedAliasTarget: string, cacheName: string, cacheConfig: array{type: ?string, pool?: string, id?: string}}> */ |
941 | | - public static function legacyCacheConfigurationProvider(): array |
942 | | - { |
943 | | - return [ |
944 | | - 'metadata_cache_default' => [ |
945 | | - 'expectedAliasName' => 'doctrine.orm.default_metadata_cache', |
946 | | - 'expectedAliasTarget' => 'cache.doctrine.orm.default.metadata', |
947 | | - 'cacheName' => 'metadata_cache_driver', |
948 | | - 'cacheConfig' => ['type' => null], |
949 | | - ], |
950 | | - 'metadata_cache_pool' => [ |
951 | | - 'expectedAliasName' => 'doctrine.orm.default_metadata_cache', |
952 | | - 'expectedAliasTarget' => 'metadata_cache_pool', |
953 | | - 'cacheName' => 'metadata_cache_driver', |
954 | | - 'cacheConfig' => ['type' => 'pool', 'pool' => 'metadata_cache_pool'], |
955 | | - ], |
956 | | - 'metadata_cache_service' => [ |
957 | | - 'expectedAliasName' => 'doctrine.orm.default_metadata_cache', |
958 | | - 'expectedAliasTarget' => 'service_target_metadata', |
959 | | - 'cacheName' => 'metadata_cache_driver', |
960 | | - 'cacheConfig' => ['type' => 'service', 'id' => 'service_target_metadata'], |
961 | | - ], |
962 | | - 'query_cache_service' => [ |
963 | | - 'expectedAliasName' => 'doctrine.orm.default_query_cache', |
964 | | - 'expectedAliasTarget' => 'service_target_query', |
965 | | - 'cacheName' => 'query_cache_driver', |
966 | | - 'cacheConfig' => ['type' => 'service', 'id' => 'service_target_query'], |
967 | | - ], |
968 | | - 'result_cache_service' => [ |
969 | | - 'expectedAliasName' => 'doctrine.orm.default_result_cache', |
970 | | - 'expectedAliasTarget' => 'service_target_result', |
971 | | - 'cacheName' => 'result_cache_driver', |
972 | | - 'cacheConfig' => ['type' => 'service', 'id' => 'service_target_result'], |
973 | | - ], |
974 | | - ]; |
975 | | - } |
976 | | - |
977 | 928 | /** @return array<string, array<string, string|array{type: ?string, pool?: string, id?: string}>> */ |
978 | 929 | public static function cacheConfigurationProvider(): array |
979 | 930 | { |
@@ -1014,6 +965,24 @@ public static function cacheConfigurationProvider(): array |
1014 | 965 | 'cacheName' => 'result_cache_driver', |
1015 | 966 | 'cacheConfig' => ['type' => 'service', 'id' => 'service_target_result'], |
1016 | 967 | ], |
| 968 | + 'metadata_cache_default' => [ |
| 969 | + 'expectedAliasName' => 'doctrine.orm.default_metadata_cache', |
| 970 | + 'expectedTarget' => 'cache.doctrine.orm.default.metadata', |
| 971 | + 'cacheName' => 'metadata_cache_driver', |
| 972 | + 'cacheConfig' => ['type' => null], |
| 973 | + ], |
| 974 | + 'metadata_cache_pool' => [ |
| 975 | + 'expectedAliasName' => 'doctrine.orm.default_metadata_cache', |
| 976 | + 'expectedTarget' => 'metadata_cache_pool', |
| 977 | + 'cacheName' => 'metadata_cache_driver', |
| 978 | + 'cacheConfig' => ['type' => 'pool', 'pool' => 'metadata_cache_pool'], |
| 979 | + ], |
| 980 | + 'metadata_cache_service' => [ |
| 981 | + 'expectedAliasName' => 'doctrine.orm.default_metadata_cache', |
| 982 | + 'expectedTarget' => 'service_target_metadata', |
| 983 | + 'cacheName' => 'metadata_cache_driver', |
| 984 | + 'cacheConfig' => ['type' => 'service', 'id' => 'service_target_metadata'], |
| 985 | + ], |
1017 | 986 | ]; |
1018 | 987 | } |
1019 | 988 |
|
@@ -1382,8 +1351,6 @@ public function testControllerResolver(bool $simpleEntityManagerConfig): void |
1382 | 1351 | $this->assertEquals(new MapEntity(null, null, null, null, null, null, null, true, true), $container->get('controller_resolver_defaults')); |
1383 | 1352 | } |
1384 | 1353 |
|
1385 | | - // phpcs:enable |
1386 | | - |
1387 | 1354 | /** @param list<string> $bundles */ |
1388 | 1355 | private static function getContainer(array $bundles = ['XmlBundle'], string $vendor = ''): ContainerBuilder |
1389 | 1356 | { |
|
0 commit comments