-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support modern bundle structure #12356
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support modern bundle structure #12356
Conversation
d760b8b to
0e68677
Compare
|
@jdreesen I'm testing your changes but couldn't load bundle public assets properly with new directory structure. On running, If you look at the Symfony code it looks for public folder in This how i autoload my bundle namespace in composer.json: Could you please confirm if putting |
|
Yes, it works. Did you configure your bundle path in
|
yes, I missed that point 🤦♂️ it works now. thank you!! |
|
@jdreesen nice work 🚀 thanks a lot! |
Symfony changed its "Directory Structure Best Practice for Reusable Bundles" in its 4.4 version.
In the old one, everything was just in the bundle root dir
/(or maybe inside/src, in which case this was considered "root").In the new one, the PHP classes moved inside
/srcand the contents ofResourcesare unpacked into the root/(with sometimes different names).Below is a comparison of the old and the new structure:
Pimcore doesn't support the new bundle structure at the moment, because it doesn't look at the new locations for Areabricks, config, templates and assets, which means:
/src/Document/Areabrick/instead of/Document/Areabrick/configinstead of/Resources/config//templatesinstead ofResources/views//publicinstead of/Resources/public/The solution is to look in both possible location, as Symfony does e.g. here, here, here or here.
Resolves #10912