Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Allow AbstractDoctrineExtension implementations to support the newer bundle structure#43181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Allow AbstractDoctrineExtension implementations to support the newer bundle structure#43181
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
4f7956f todcd69c2Compare1abd3c7 to2dac6d0Compare2dac6d0 to5fb8713Comparec321b30 tofe42094Comparenicolas-grekas commentedNov 13, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@mbabker I force-pushedthese changes on your fork, can you please have a look and let me know if that makes sense? Is that something that can be tested? |
mbabker commentedNov 13, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Looks right to me.
Maybe? I'd have to sit down and work out testing the Edit: I got PhpStorm to run the bridge tests with coverage to see if there was something existing I could add to, |
nicolas-grekas commentedNov 13, 2021
I guess this is tested in DoctrineBundle? |
mbabker commentedNov 13, 2021
It would have to be since |
nicolas-grekas commentedNov 13, 2021
Can you please send a PR to DoctrineBundle to add the new arguments there? |
mbabker commentedNov 13, 2021
Sure thing! |
mbabker commentedNov 13, 2021
DoctrineBundle PR isdoctrine/DoctrineBundle#1418 |
fe42094 to6d04a16Compare…upport the newer bundle structure
6d04a16 to136c4a3Comparefabpot commentedNov 16, 2021
Not sure what "newer bundle directory structure" refers to. |
fabpot commentedNov 16, 2021
To answer my own question:#32845 |
nicolas-grekas commentedNov 16, 2021
See alsosymfony/symfony-docs#16109, doc has some inconsistencies that should be fixed. |
fabpot commentedNov 16, 2021
Thank you@mbabker. |
Uh oh!
There was an error while loading.Please reload this page.
Container extensions inheriting from
Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension(i.e. the extensions in all Doctrine bundles) currently cannot smoothly support the newer bundle directory structure because the existing API relies on information being gleaned from Reflection for the bundle class. This PR is an attempt to allow these extensions to support the newer structure. The notable changes here are:getMappingDriverBundleConfigDefaults()method adds astring $bundleDirargument which replaces gleaning the bundle directory by reflecting on the Bundle classgetMappingResourceConfigDirectory()method adds astring $bundleDirargument, this is needed for the concrete implementations to have conditional paths supporting both structures (similar to other checks in the framework like theis_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundleDir.'/templates'check for the templates path)