Skip to content
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

Hook in requireCommand #89

Open
Arcesilas opened this issue Jan 23, 2019 · 1 comment
Open

Hook in requireCommand #89

Arcesilas opened this issue Jan 23, 2019 · 1 comment

Comments

@Arcesilas
Copy link
Contributor

Arcesilas commented Jan 23, 2019

Hi,

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.

@franzliedke
Copy link
Owner

Thanks for the suggestion! I'd be very interested in that PR. 😀

As long as the repository manager is already available at that time, this shoul actually work. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants