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
Setting alternative web/public dir is inconsistent/fails #2461
Comments
Does it work in Contao 4.9? |
There are two configurations, because there are two separate environments. Contao does not know about the Composer configuration, and Composer does not know about Contao. Maybe we should add a compiler pass that sets the |
👍 The difference being, that Symfony does not have a dedicated config option, right? (I don't see a compiler pass in the referenced PR, maybe I'm missing sth.) We would still need to make sure that you did not overwrite the config and use a setting the |
As discussed in Mumble on November 19th, we want to set |
For reference, the following parameters can be set in Symfony Flex: https://github.com/symfony/flex/blob/e38520236bdc911c2f219634b485bc328746e980/src/Flex.php#L879-L885 |
This issue is marked as |
As discussed in Mumble on March 11, it should work in Contao 4.9 if you set the web directory in both the composer.json and the app configuration. If this is not the case, we should fix it. The new feature for Contao 4.12 would be what we have discussed in the last call. |
Affected version(s)
Contao 4.9
Description
see discussion #2183 (comment)
Contao uses two sources for the configured web/public directory: The config from
extra.symfony-public-dir
/extra.public-dir
(rootcomposer.json
) and the config keycontao.web_dir
(core-bundle
).The bundle config defaults to
%kernel.project_dir%/web
. It's used in quite some places (templating, images, combiner, ...). The current composer script handler uses the entry from the rootcomposer.json
and defaults toweb
(relative path). So you need to keep these things in sync otherwise either one fails.Possible solution
Imo we should only only use the config in our code and its default should be:
composer.json
→extra.public-dir
composer.json
→extra.symfony-public-dir
%kernel.project_dir%/web
The text was updated successfully, but these errors were encountered: