Skip to content

Commit 88b43f7

Browse files
committed
minor #1184 [CI][Turbo] Fix direct deprecation notice (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [CI][Turbo] Fix direct deprecation notice Fix this deprecation triggered during tests with Doctrine >= 2.8 > Not enabling lazy ghost objects is deprecated and will not be supported in Doctrine ORM 3.0. Ensure Doctrine\ORM\Configuration::setLazyGhostObjectEnabled(true) is called to enable them. (Failure unrelated) Commits ------- 09dc6eb [CI][Turbo] Fix direct deprecation notice
2 parents e26be66 + 09dc6eb commit 88b43f7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Turbo/tests/app/Kernel.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,14 @@ protected function configureContainer(ContainerConfigurator $container): void
9393
],
9494
];
9595

96-
// https://github.com/doctrine/DoctrineBundle/pull/1661
97-
$doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle');
98-
if (null !== $doctrineBundleVersion && version_compare($doctrineBundleVersion, '2.9.0', '>=')) {
99-
$doctrineConfig['orm']['report_fields_where_declared'] = true;
96+
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
97+
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
98+
$doctrineConfig['orm']['enable_lazy_ghost_objects'] = true;
99+
}
100+
// https://github.com/doctrine/DoctrineBundle/pull/1661
101+
if (version_compare($doctrineBundleVersion, '2.9.0', '>=')) {
102+
$doctrineConfig['orm']['report_fields_where_declared'] = true;
103+
}
100104
}
101105

102106
$container

0 commit comments

Comments
 (0)