Skip to content

Commit f7117f5

Browse files
committed
[CI] Fix highest dev jobs
1 parent 59fecc0 commit f7117f5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Autocomplete/tests/Fixtures/Kernel.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ protected function build(ContainerBuilder $container): void
8181
public function process(ContainerBuilder $container): void
8282
{
8383
$container->removeDefinition('doctrine.orm.listeners.pdo_session_handler_schema_listener');
84+
85+
if (\PHP_VERSION_ID >= 80400) {
86+
// Workaround for `RuntimeException: Unable to create the Doctrine Proxy directory "". in vendor/symfony/doctrine-bridge/CacheWarmer/ProxyCacheWarmer.php:49`
87+
// when running PHP 8.4 and Doctrine ORM 3.5+.
88+
$container->getDefinition('doctrine.orm.default_configuration')
89+
->addMethodCall('setProxyDir', ['%doctrine.orm.proxy_dir%']);
90+
}
8491
}
8592
}, PassConfig::TYPE_BEFORE_OPTIMIZATION, 1);
8693
}
@@ -126,6 +133,9 @@ protected function configureContainer(ContainerConfigurator $c): void
126133
];
127134
}
128135
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
136+
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
137+
$doctrineConfig['orm']['enable_lazy_ghost_objects'] = true;
138+
}
129139
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
130140
$doctrineConfig['orm']['enable_native_lazy_objects'] = true;
131141
}

0 commit comments

Comments
 (0)