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

[RFC] Allow different location for bundle assets #29213

Open
garak opened this Issue Nov 14, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@garak
Contributor

garak commented Nov 14, 2018

Description
The current behavior for assets in bundles is looking for an hard-coded path named Resources/public/ in bundle's path.
So, when developing a bundle, you're forced to use the "typical" directory structure, like the following example:

DependencyInjection/
FooBundle.php
Resources/ (with public, docs, etc.)
Tests/

It would be nice to allow to structure your bundle with a more modern (and more standard), like this:

assets
docs
src
templates
tests 

With the hard-coded path mentioned above, this is not possible, unless you symlink src/Resources to asset directory.

I found a similar RFC in #11051 but this is far simpler, since it only involves public paths for bundles.
Also, a solution would be much simpler and not BC-breaking (I guess that adding a new method to Bundle class would be enough)

@ro0NL

This comment has been minimized.

Contributor

ro0NL commented Nov 14, 2018

PublishingBundleInterface::getPublicPath(): string could work :)

@yceruto

This comment has been minimized.

Contributor

yceruto commented Nov 14, 2018

I'd like to see a new structure for bundles too, but a bundle must be able to support several versions of Symfony. So, it must work with Resources/public/ AND assets/, not one or the other. The clever solution should find an easy upgrade path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment