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'm trying to write a command that runs composer require and use Studio. Currently, Studio is only loaded on update and install commands.
After trying many different events, I found out that it's possible to use the PluginEvents::PRE_COMMAND_RUN event. Since it's very generic, the command name should be check beforehand, using PreCommandRunEvent::getCommand().
This event could be used for all commands: install, require and update.
By the way, this would allow us to use Studio with create-project command, without using --repository option 😁
I can provide a PR.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to write a command that runs
composer require
and use Studio. Currently, Studio is only loaded onupdate
andinstall
commands.After trying many different events, I found out that it's possible to use the
PluginEvents::PRE_COMMAND_RUN
event. Since it's very generic, the command name should be check beforehand, usingPreCommandRunEvent::getCommand()
.This event could be used for all commands:
install
,require
andupdate
.By the way, this would allow us to use Studio with
create-project
command, without using--repository option
😁I can provide a PR.
The text was updated successfully, but these errors were encountered: