Skip to content

Commit c29bcfe

Browse files
Replace version check with feature check
1 parent 3d6b9bb commit c29bcfe

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Symfony/Bridge/Doctrine/Tests/DoctrineTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function createTestConfiguration(): Configuration
6262
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
6363
}
6464

65-
if (\version_compare(\Composer\InstalledVersions::getVersion('doctrine/persistence') ?? '999.999.999', '3.1.0', '>=')) {
65+
if (!class_exists(\Doctrine\Persistence\Mapping\Driver\AnnotationDriver::class)) { // doctrine/persistence >= 3.0
6666
$config->setLazyGhostObjectEnabled(true);
6767
}
6868

src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private function init(bool $withStopwatch = true): void
5555
if (class_exists(DefaultSchemaManagerFactory::class)) {
5656
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
5757
}
58-
if (\version_compare(\Composer\InstalledVersions::getVersion('doctrine/persistence') ?? '999.999.999', '3.1.0', '>=')) {
58+
if (!class_exists(\Doctrine\Persistence\Mapping\Driver\AnnotationDriver::class)) { // doctrine/persistence >= 3.0
5959
$config->setLazyGhostObjectEnabled(true);
6060
}
6161
$this->debugDataHolder = new DebugDataHolder();

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private function createExtractor(): DoctrineExtractor
4444
if (class_exists(DefaultSchemaManagerFactory::class)) {
4545
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
4646
}
47-
if (\version_compare(\Composer\InstalledVersions::getVersion('doctrine/persistence') ?? '999.999.999', '3.1.0', '>=')) {
47+
if (!class_exists(\Doctrine\Persistence\Mapping\Driver\AnnotationDriver::class)) { // doctrine/persistence >= 3.0
4848
$config->setLazyGhostObjectEnabled(true);
4949
}
5050

src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function bootstrapProvider(): DoctrineTokenProvider
124124
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
125125
}
126126

127-
if (\version_compare(\Composer\InstalledVersions::getVersion('doctrine/persistence') ?? '999.999.999', '3.1.0', '>=')) {
127+
if (!class_exists(\Doctrine\Persistence\Mapping\Driver\AnnotationDriver::class)) { // doctrine/persistence >= 3.0
128128
$config->setLazyGhostObjectEnabled(true);
129129
}
130130

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy