Skip to content

Commit d7685d2

Browse files
committed
minor #3005 Upgrade dev dependency doctrine/doctrine-bundle to ^2.14 (Kocal)
This PR was merged into the 3.x branch. Discussion ---------- Upgrade dev dependency doctrine/doctrine-bundle to ^2.14 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Since we removed Symfony <6.4 support for UX 3.0, we can upgrade doctrine-bundle to the lowest version where Symfony 5.x support has been removed (doctrine/DoctrineBundle#1849) Commits ------- bde9efb Upgrade dev dependency doctrine/doctrine-bundle to ^2.14
2 parents 392a557 + bde9efb commit d7685d2

File tree

5 files changed

+16
-24
lines changed

5 files changed

+16
-24
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.5.0",
36+
"doctrine/doctrine-bundle": "^2.14",
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: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ protected function configureContainer(ContainerConfigurator $c): void
114114
'dbal' => ['url' => '%env(resolve:DATABASE_URL)%'],
115115
'orm' => [
116116
'auto_generate_proxy_classes' => true,
117+
'enable_lazy_ghost_objects' => true,
118+
'report_fields_where_declared' => true,
119+
'validate_xml_mapping' => true,
117120
'auto_mapping' => true,
118121
'mappings' => [
119122
'Test' => [
@@ -124,18 +127,13 @@ protected function configureContainer(ContainerConfigurator $c): void
124127
'alias' => 'Test',
125128
],
126129
],
130+
'controller_resolver' => [
131+
'auto_mapping' => false,
132+
],
127133
],
128134
];
129-
if (class_exists(AssociationMapping::class)) {
130-
// Doctrine ORM >= 3.0
131-
$doctrineConfig['orm']['controller_resolver'] = [
132-
'auto_mapping' => true,
133-
];
134-
}
135+
135136
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
136-
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
137-
$doctrineConfig['orm']['enable_lazy_ghost_objects'] = true;
138-
}
139137
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
140138
$doctrineConfig['orm']['enable_native_lazy_objects'] = true;
141139
}

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",
3939
"doctrine/collections": "^1.6.8|^2.0",
40-
"doctrine/doctrine-bundle": "^2.4.3",
40+
"doctrine/doctrine-bundle": "^2.14",
4141
"doctrine/orm": "^2.9.4",
4242
"doctrine/persistence": "^2.5.2|^3.0",
4343
"phpdocumentor/reflection-docblock": "5.x-dev",

src/LiveComponent/tests/Fixtures/Kernel.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ protected function configureContainer(ContainerConfigurator $c): void
151151
],
152152
'orm' => [
153153
'auto_generate_proxy_classes' => true,
154+
'enable_lazy_ghost_objects' => true,
155+
'report_fields_where_declared' => true,
156+
'validate_xml_mapping' => true,
154157
'auto_mapping' => true,
155158
'mappings' => [
156159
'Default' => [
@@ -168,22 +171,13 @@ protected function configureContainer(ContainerConfigurator $c): void
168171
'alias' => 'XML',
169172
],
170173
],
174+
'controller_resolver' => [
175+
'auto_mapping' => false,
176+
],
171177
],
172178
];
173179

174180
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('doctrine/doctrine-bundle')) {
175-
if (version_compare($doctrineBundleVersion, '2.8.0', '>=')) {
176-
$doctrineConfig['orm']['enable_lazy_ghost_objects'] = true;
177-
}
178-
// https://github.com/doctrine/DoctrineBundle/pull/1661
179-
if (version_compare($doctrineBundleVersion, '2.9.0', '>=')) {
180-
$doctrineConfig['orm']['report_fields_where_declared'] = true;
181-
$doctrineConfig['orm']['validate_xml_mapping'] = true;
182-
$doctrineConfig['dbal']['schema_manager_factory'] = 'doctrine.dbal.default_schema_manager_factory';
183-
}
184-
if (version_compare($doctrineBundleVersion, '2.12.0', '>=')) {
185-
$doctrineConfig['orm']['controller_resolver']['auto_mapping'] = false;
186-
}
187181
if (\PHP_VERSION_ID >= 80400 && version_compare($doctrineBundleVersion, '2.15.0', '>=')) {
188182
$doctrineConfig['orm']['enable_native_lazy_objects'] = true;
189183
}

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.14",
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)