Skip to content

Commit 9ef2746

Browse files
committed
Revert doctrine change
1 parent 7aebecb commit 9ef2746

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/Doctrine/EntityRegeneratorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\MakerBundle\Tests\Doctrine;
1313

1414
use Composer\InstalledVersions;
15+
use Composer\Semver\VersionParser;
1516
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
1617
use PHPUnit\Framework\Attributes\DataProvider;
1718
use PHPUnit\Framework\TestCase;
@@ -177,13 +178,12 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
177178
],
178179
];
179180

180-
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
181-
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
182-
$orm['enable_lazy_ghost_objects'] = true;
183-
}
184-
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
185-
$orm['enable_native_lazy_objects'] = true;
186-
}
181+
if (InstalledVersions::satisfies(new VersionParser(), 'doctrine/doctrine-bundle', '^2.8')) {
182+
$orm['enable_lazy_ghost_objects'] = true;
183+
}
184+
185+
if (\PHP_VERSION_ID >= 80400 && InstalledVersions::satisfies(new VersionParser(), 'doctrine/doctrine-bundle', '^2.15')) {
186+
$orm['enable_native_lazy_objects'] = true;
187187
}
188188

189189
$c->prependExtensionConfig('doctrine', [

0 commit comments

Comments
 (0)