-
Notifications
You must be signed in to change notification settings - Fork 63
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
CommandInterface misses getHandler() method #182
Comments
For library it is not neccessary, that a command has a handler. It is just an object that is returned if the user enters the name as an argument. What you do with it is up to you. You can define your own CommandInterface that extends the one from getopt-php and defines this get handler or handle method. I for my part like a handle method more than a getHandler method. |
In that case, what is the recommended way of using the What I'm currently doing is basically this:
But this doesn't type check, because I do agree that requiring |
Personally I have an abstract command class that defines a handle method and I prefer it that way. But it would be a breaking change that a handle method is required by the interface. But what I'm most afraid is that the actions will not work anymore and I'm very much bored of that crap from github (had to change it first to github actions because travis said pay or leave and now the pipelines don't work anymore because they introduce breaking changes without proper versioning). So at the moment I'm not doing anything. If you want you can create a MR to fix the actions and a MR to introduce a handle method for the next major release. |
CommandInterface
is missing thegetHandler()
method, which is needed to do anything useful with thegetCommand()
return value.Unfortunately, adding the method is technically a breaking change :/
The text was updated successfully, but these errors were encountered: