Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"require-dev": {
"composer/semver": "^3.0",
"doctrine/doctrine-bundle": "^2.5.0|^3.0.0",
"doctrine/doctrine-bundle": "^2.10|^3.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a conflict rule for "doctrine/doctrine-bundle": "<2.10"

"doctrine/orm": "^2.15|^3",
"doctrine/persistence": "^3.1|^4.0",
"symfony/http-client": "^6.4|^7.0|^8.0",
Expand Down
14 changes: 7 additions & 7 deletions tests/Doctrine/EntityRegeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Bundle\MakerBundle\Tests\Doctrine;

use Composer\InstalledVersions;
use Composer\Semver\VersionParser;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
Expand Down Expand Up @@ -175,13 +176,12 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
],
];

if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
$orm['enable_lazy_ghost_objects'] = true;
}
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
$orm['enable_native_lazy_objects'] = true;
}
if (InstalledVersions::satisfies(new VersionParser(), 'doctrine/doctrine-bundle', '^2.8')) {
$orm['enable_lazy_ghost_objects'] = true;
Comment on lines +179 to +180
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition is to not add the option for doctrine/doctrine-bundle 3

}

if (\PHP_VERSION_ID >= 80400 && InstalledVersions::satisfies(new VersionParser(), 'doctrine/doctrine-bundle', '^2.15')) {
$orm['enable_native_lazy_objects'] = true;
}

$c->prependExtensionConfig('doctrine', [
Expand Down
Loading