You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking today about plugins having other plugins as dependencies. We can achieve that by just placing composer package with other plugin as dependency - but that other plugin would still not be installed in the control panel (its code would just be placed in vendor) and user would need to manually go to settings to do that.
Why not add another step to plugin installation process - if the script would detect other craft plugins in composer dependencies, it would display prompt asking user if he would want to install these plugins as well.
I think this would be useful too.
We can do it manually at the moment by installing those dependencies in the beforeInstall method of that plugin, it does work but creates problems when applying config on other environments.
If plugin1 installs plugin2 as a dependency, applying the config will make plugin1 install plugin2 again without looking at the state of the current config. When this happens \Craft::$app->projectConfig->isApplyingYamlChanges is still false so we can't check if we're applying config or not.
A first step to allow developers to do it manually could be a new marker on the project config \Craft::$app->projectConfig->isInstallingPluginsFromConfig or something ?
This discussion was converted from issue #6347 on June 22, 2021 06:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was thinking today about plugins having other plugins as dependencies. We can achieve that by just placing composer package with other plugin as dependency - but that other plugin would still not be installed in the control panel (its code would just be placed in
vendor
) and user would need to manually go to settings to do that.Why not add another step to plugin installation process - if the script would detect other craft plugins in composer dependencies, it would display prompt asking user if he would want to install these plugins as well.
Beta Was this translation helpful? Give feedback.
All reactions