diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 04a38b27..ebc833da 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -511,7 +511,7 @@ private function addOrmSection(ArrayNodeDefinition $node): void ->defaultValue(! method_exists(ProxyFactory::class, 'resetUninitializedProxy')) ->info('Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation') ->end() - ->scalarNode('proxy_dir')->defaultValue('%kernel.cache_dir%/doctrine/orm/Proxies')->end() + ->scalarNode('proxy_dir')->defaultValue('%kernel.build_dir%/doctrine/orm/Proxies')->end() ->scalarNode('proxy_namespace')->defaultValue('Proxies')->end() ->arrayNode('controller_resolver') ->canBeDisabled() diff --git a/src/DependencyInjection/DoctrineExtension.php b/src/DependencyInjection/DoctrineExtension.php index feab5240..de74334c 100644 --- a/src/DependencyInjection/DoctrineExtension.php +++ b/src/DependencyInjection/DoctrineExtension.php @@ -1115,7 +1115,7 @@ private function createMetadataCache(string $objectManagerName, ContainerBuilder $cache = new Definition(ArrayAdapter::class); if (! $container->getParameter('kernel.debug')) { - $phpArrayFile = '%kernel.cache_dir%' . sprintf('/doctrine/orm/%s_metadata.php', $objectManagerName); + $phpArrayFile = '%kernel.build_dir%' . sprintf('/doctrine/orm/%s_metadata.php', $objectManagerName); $cacheWarmerServiceId = $this->getObjectManagerElementName(sprintf('%s_%s', $objectManagerName, 'metadata_cache_warmer')); $container->register($cacheWarmerServiceId, DoctrineMetadataCacheWarmer::class) diff --git a/tests/CacheSchemaSubscriberTest.php b/tests/CacheSchemaSubscriberTest.php index 22bcc169..22c7d6a8 100644 --- a/tests/CacheSchemaSubscriberTest.php +++ b/tests/CacheSchemaSubscriberTest.php @@ -39,9 +39,9 @@ public function testSchemaSubscriberWiring(string $adapterId, string $subscriber 'kernel.debug' => false, 'kernel.bundles' => [], 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.runtime_environment' => '%%env(default:kernel.environment:APP_RUNTIME_ENV)%%', - 'kernel.build_dir' => __DIR__ . '/../../../../', // src dir 'kernel.root_dir' => __DIR__ . '/../../../../', // src dir 'kernel.project_dir' => __DIR__ . '/../../../../', // src dir 'kernel.bundles_metadata' => [], diff --git a/tests/DependencyInjection/AbstractDoctrineExtensionTest.php b/tests/DependencyInjection/AbstractDoctrineExtensionTest.php index 7346b724..26d72a2e 100644 --- a/tests/DependencyInjection/AbstractDoctrineExtensionTest.php +++ b/tests/DependencyInjection/AbstractDoctrineExtensionTest.php @@ -1504,6 +1504,7 @@ private function getContainer(array $bundles): ContainerBuilder 'kernel.debug' => false, 'kernel.bundles' => $map, 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.root_dir' => __DIR__ . '/../../', // src dir 'kernel.project_dir' => __DIR__ . '/../../', // src dir diff --git a/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php b/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php index f83cf725..f5fd9c99 100644 --- a/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php +++ b/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php @@ -69,9 +69,9 @@ public function testRepositoryServiceWiring(): void 'kernel.debug' => false, 'kernel.bundles' => $bundles, 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.runtime_environment' => '%%env(default:kernel.environment:APP_RUNTIME_ENV)%%', - 'kernel.build_dir' => __DIR__ . '/../../../../', // src dir 'kernel.root_dir' => __DIR__ . '/../../../../', // src dir 'kernel.project_dir' => __DIR__ . '/../../../../', // src dir 'kernel.bundles_metadata' => [], diff --git a/tests/DependencyInjection/DoctrineExtensionTest.php b/tests/DependencyInjection/DoctrineExtensionTest.php index c3d25d8c..7ebce462 100644 --- a/tests/DependencyInjection/DoctrineExtensionTest.php +++ b/tests/DependencyInjection/DoctrineExtensionTest.php @@ -519,7 +519,7 @@ public function testDependencyInjectionConfigurationDefaults(): void $this->assertEquals( [ new Reference('doctrine.orm.default_entity_manager'), - '%kernel.cache_dir%/doctrine/orm/default_metadata.php', + '%kernel.build_dir%/doctrine/orm/default_metadata.php', ], $definition->getArguments(), ); @@ -528,7 +528,7 @@ public function testDependencyInjectionConfigurationDefaults(): void $this->assertEquals(PhpArrayAdapter::class, $definition->getClass()); $arguments = $definition->getArguments(); - $this->assertSame('%kernel.cache_dir%/doctrine/orm/default_metadata.php', $arguments[0]); + $this->assertSame('%kernel.build_dir%/doctrine/orm/default_metadata.php', $arguments[0]); $wrappedDefinition = $arguments[1]; $this->assertSame(ArrayAdapter::class, $wrappedDefinition->getClass()); @@ -1506,6 +1506,7 @@ private static function getContainer(array $bundles = ['YamlBundle'], string $ve 'kernel.bundles' => $map, 'kernel.bundles_metadata' => $metadataMap, 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.root_dir' => __DIR__ . '/../../', // src dir ])); diff --git a/tests/DependencyInjection/Fixtures/config/xml/orm_proxy.xml b/tests/DependencyInjection/Fixtures/config/xml/orm_proxy.xml index 96208ddb..a4410da9 100644 --- a/tests/DependencyInjection/Fixtures/config/xml/orm_proxy.xml +++ b/tests/DependencyInjection/Fixtures/config/xml/orm_proxy.xml @@ -7,6 +7,6 @@ http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd"> - + diff --git a/tests/LockStoreSchemaListenerTest.php b/tests/LockStoreSchemaListenerTest.php index 93f4a182..142645a5 100644 --- a/tests/LockStoreSchemaListenerTest.php +++ b/tests/LockStoreSchemaListenerTest.php @@ -37,9 +37,9 @@ public function testLockStoreSchemaSubscriberWiring(array $config, int $expected 'kernel.debug' => false, 'kernel.bundles' => [], 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.runtime_environment' => '%%env(default:kernel.environment:APP_RUNTIME_ENV)%%', - 'kernel.build_dir' => __DIR__ . '/../../../../', // src dir 'kernel.root_dir' => __DIR__ . '/../../../../', // src dir 'kernel.project_dir' => __DIR__ . '/../../../../', // src dir 'kernel.bundles_metadata' => [], diff --git a/tests/ServiceRepositoryTest.php b/tests/ServiceRepositoryTest.php index e064f5a0..94121b6e 100644 --- a/tests/ServiceRepositoryTest.php +++ b/tests/ServiceRepositoryTest.php @@ -49,9 +49,9 @@ public function testRepositoryServiceWiring(): void 'kernel.debug' => false, 'kernel.bundles' => ['RepositoryServiceBundle' => RepositoryServiceBundle::class], 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.runtime_environment' => '%%env(default:kernel.environment:APP_RUNTIME_ENV)%%', - 'kernel.build_dir' => __DIR__ . '/../../../../', // src dir 'kernel.root_dir' => __DIR__ . '/../../../../', // src dir 'kernel.project_dir' => __DIR__ . '/../../../../', // src dir 'kernel.bundles_metadata' => [], diff --git a/tests/TestCase.php b/tests/TestCase.php index 77034079..c5957040 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -26,6 +26,7 @@ public function createXmlBundleTestContainer(): ContainerBuilder 'kernel.debug' => false, 'kernel.bundles' => ['XmlBundle' => 'Fixtures\Bundles\XmlBundle\XmlBundle'], 'kernel.cache_dir' => sys_get_temp_dir(), + 'kernel.build_dir' => sys_get_temp_dir(), 'kernel.environment' => 'test', 'kernel.root_dir' => __DIR__ . '/../../../../', // src dir 'kernel.project_dir' => __DIR__ . '/../../../../', // src dir