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

How to use @hook interact? #2524

Closed
weitzman opened this issue Dec 29, 2016 · 2 comments
Closed

How to use @hook interact? #2524

weitzman opened this issue Dec 29, 2016 · 2 comments
Assignees

Comments

@weitzman
Copy link
Member

Please advise on how to use @hook interact. We now have two non-functional instances of it. See WatchdogCommands and ImageCommands.

@greg-1-anderson
Copy link
Member

@hook interact is called by the Symfony Console interact method during the Symfony Console command dispatch process, which Drush is not using. Beyond the fact that this is not implemented, the usage in WatchdogCommands is correct.

Hook interact is called in AnnotatedCommand::interact(). We simply need to call this method, or equivalent functionality, iff interaction has not been disabled. We also need to decide if -n should behave like Drush 8 or like Symfony Console. Terminus has both --yes and -n, the later of which behaves like Symfony Console. In SC, -n defaults most yes/no prompts to yes. Terminus defaults destructive prompts to no and the rest to yes.

@weitzman
Copy link
Member Author

We are now using this in a couple commands. Grep for @hook interact

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