Skip to content

Commit fbd9483

Browse files
committed
Add compatibility with doctrine/doctrine-bundle:^3.0.0
1 parent 7983aa9 commit fbd9483

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

src/Autocomplete/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"require-dev": {
3535
"doctrine/collections": "^1.6.8|^2.0",
36-
"doctrine/doctrine-bundle": "^2.4.3",
36+
"doctrine/doctrine-bundle": "^2.4.3|^3.0.0",
3737
"doctrine/orm": "^2.9.4|^3.0",
3838
"fakerphp/faker": "^1.22",
3939
"mtdowling/jmespath.php": "^2.6",

src/Autocomplete/tests/Fixtures/Kernel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ protected function configureContainer(ContainerConfigurator $c): void
113113
$doctrineConfig = [
114114
'dbal' => ['url' => '%env(resolve:DATABASE_URL)%'],
115115
'orm' => [
116-
'auto_generate_proxy_classes' => true,
117116
'auto_mapping' => true,
118117
'mappings' => [
119118
'Test' => [
@@ -133,12 +132,15 @@ protected function configureContainer(ContainerConfigurator $c): void
133132
];
134133
}
135134
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
136-
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
135+
if (version_compare($doctrineBundleVersion, '2.8.0', '>=') && version_compare($doctrineBundleVersion, '3.0.0', '<')) {
137136
$doctrineConfig['orm']['enable_lazy_ghost_objects'] = true;
138137
}
139138
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
140139
$doctrineConfig['orm']['enable_native_lazy_objects'] = true;
141140
}
141+
if (version_compare($doctrineBundleVersion, '3.0.0', '<')) {
142+
$doctrineConfig['orm']['auto_generate_proxy_classes'] = true;
143+
}
142144
}
143145

144146
$c->extension('doctrine', $doctrineConfig);

src/LiveComponent/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"require-dev": {
3838
"doctrine/annotations": "^1.0|^2.0",
3939
"doctrine/collections": "^1.6.8|^2.0",
40-
"doctrine/doctrine-bundle": "^2.4.3",
40+
"doctrine/doctrine-bundle": "^2.4.3|^3.0.0",
4141
"doctrine/orm": "^2.9.4|^3.0",
4242
"doctrine/persistence": "^2.5.2|^3.0",
4343
"phpdocumentor/reflection-docblock": "5.x-dev",

src/LiveComponent/tests/Fixtures/Kernel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ protected function configureContainer(ContainerConfigurator $c): void
162162
'url' => '%env(resolve:DATABASE_URL)%',
163163
],
164164
'orm' => [
165-
'auto_generate_proxy_classes' => true,
166165
'auto_mapping' => true,
167166
'mappings' => [
168167
'Default' => [
@@ -184,7 +183,7 @@ protected function configureContainer(ContainerConfigurator $c): void
184183
];
185184

186185
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
187-
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
186+
if (version_compare($doctrineBundleVersion, '2.8.0', '>=') && version_compare($doctrineBundleVersion, '3.0.0', '<')) {
188187
$doctrineConfig['orm']['enable_lazy_ghost_objects'] = true;
189188
}
190189
// https://github.com/doctrine/DoctrineBundle/pull/1661
@@ -199,6 +198,9 @@ protected function configureContainer(ContainerConfigurator $c): void
199198
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
200199
$doctrineConfig['orm']['enable_native_lazy_objects'] = true;
201200
}
201+
if (version_compare($doctrineBundleVersion, '3.0.0', '<')) {
202+
$doctrineConfig['orm']['auto_generate_proxy_classes'] = true;
203+
}
202204
}
203205

204206
$c->extension('doctrine', $doctrineConfig);

src/Turbo/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"symfony/stimulus-bundle": "^2.9.1"
3939
},
4040
"require-dev": {
41-
"doctrine/doctrine-bundle": "^2.4.3",
41+
"doctrine/doctrine-bundle": "^2.4.3|^3.0.0",
4242
"doctrine/orm": "^2.8|^3.0",
4343
"phpstan/phpstan": "^2.1.17",
4444
"symfony/asset-mapper": "^6.4|^7.0|^8.0",

0 commit comments

Comments
 (0)