Open fritzmg opened 9 months ago
hmmm… having this in the composer.json
will prevent the Contao Manager von automatically configuring it though 😞
We include it for contao/managed-edition
as well though, so you don't have to confirm anything when running composer create-project
. So I think we should include it here too?
contao/managed-edition
is not used by the Contao Manager though. I agree this is a problem, I don't know how to fix it though 🤔
But why is it a problem for the Contao Manager in the first place? If contao/managed-edition
and contao/contao-demo
(and isotope/isotope-demo
for that matter) come with appropriately allowed plugins, no issues should occur during installation?
And the Contao Manager can always alter the composer.json
afterwards.
We can never know what plugins a user will install, e.g. php-http/discovery
was added in a patch version, and that would now prevent any installation of packages in an existing installation.
And the Contao Manager can always alter the
composer.json
afterwards.
The Contao Manager does not alter the composer.json
user configuration. It is explicitly meant so you can allow or deny plugins if you want to, but the default should be everything is allowed (which is done automatically if the setting is not present).
The Contao Manager does not alter the
composer.json
user configuration.
The Contao Manager for example updates the post-update-cmd
and post-install-cmd
scripts to use vendor/bin/contao-setup
. So why not also remove the allow-plugins
section after initial installation?
but the default should be everything is allowed (which is done automatically if the setting is not present).
But then we should add this default everywhere.
Anyway, what other solution do you propose?
Anyway, what other solution do you propose?
I don't have any other solution 🤷 However, I would also argue that anyone installing the demo through Composer should be aware of Composer features like allowing plugins, and should be able to decide whether a plugin is wanted or not. Not saying that is best user experience but… 😬
So why not also remove the
allow-plugins
section after initial installation?
That could be a viable option. But then we can only update this repo once the feature is implemented in the Contao Manager.
However, I would also argue that anyone installing the demo through Composer should be aware of Composer features like allowing plugins, and should be able to decide whether a plugin is wanted or not. Not saying that is best user experience but… 😬
Regardless I would argue that
composer create-project contao/managed-edition
composer create-project contao/contao-demo
composer create-project isotope/isotope-demo
should all work the same and not require different arguments from one another.
I'm not sure what the best solution is here. Suggestions welcome :-)
@sascha-mueller
just summarized, I think that's more of a tie between manual install
vs via Contao Manager
but this can't be merged as is because the manager would need to implement this feature first to avoid the discussed problems:
https://github.com/contao/contao-demo/pull/16#issuecomment-1951994839
This is simply a consistency problem for installing the demo via composer🤔.
I'd leave this issue open for now, it would ask you to add the mentioned allow-plugins anyways when installing via composer.
Just as a headsup for anyone reading this, that's what I use because it's cumbersome to always allow the same plugins:
composer config --global allow-plugins.contao/manager-plugin true
composer config --global allow-plugins.contao-components/installer true
composer config --global allow-plugins.php-http/discovery true
Whoever uses the same won't have to deal with this and can safely work on the demo if they ever need to without updating the composer.json
In connection with local installations via DDEV/Composer and the Contao demo I had to add the mentioned plugins (contao-components/installer & contao/manager-plugin) manually. Therefore, it would certainly be easier for many if this could be taken into account in the .json.
I am not a developer, if there should be fundamental problems with this, at least the “detour” via the Contao Manager works (in a DDEV procedure).
The current
composer.json
is still missing theallow-plugins
section of thecontao/managed-edition
causing prompts when installing viacomposer create-project
.