-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Move the assets
folder to public/assets
#7094
base: 5.x
Are you sure you want to change the base?
Conversation
3d53ece
to
8b657e1
Compare
c08835f
to
aecd61c
Compare
How does this handle the case that any existing Contao installation has |
There are two possible solutions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should improve BC a bit, otherwise this is the way to go IMO 👍
e41594b
to
6771f24
Compare
In #7093 we talked about that the Is becoming compatible with symfony/asset-mapper not an alternative goal here? |
It is, and that‘s exactly what the pull request does. After it has been merged, Contao will no longer use the
Anything beyond that can only be done in Contao 6. |
If there are no naming conflicts, that would work fine! Otherwise one could always also change the output folder of asset mapper. So two promising paths after the PR was merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need something that actively deletes an already existing symlink from /public/assets
to /assets
?
With a check like !$this->symlinkAssets && is_link(Path::join($this->webDir, 'assets'))
?
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
Added in 742e647. |
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
(But I did not test it manually)
I have tested it extensively and found another bug: ce48ebc Now everything should work. |
Implements #7093
With these surprisingly few changes, we can get rid of the
assets
directory in the project root, as the assets and Contao components are installed directly in thepublic/assets
folder.I know that we originally wanted to install the Contao components in
public/components
, but that would break all existing references in$GLOBALS['TL_CSS']
,$GLOBALS['TL_JAVASCRIPT']
and so on. The current solution is almost 100% backwards compatible because no paths change at all.