-
Notifications
You must be signed in to change notification settings - Fork 94
[Command] getOption return types #36
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
Comments
I though about this before and so far I am not sure how to implement it. For example, you can have the options defined in a parent, and you should still be able to recognize their types. It gets quite complicated. I have vague ideas about using type specifying extension (define some dummy variables in the command's scope, see Also, #20. |
Maybe it could somehow infer just the command name and read the options
from Symfony app instance somehow?
On Thu, 14 Feb 2019 at 12:57, Lukáš Unger ***@***.***> wrote:
I though about this before and so far I am not sure how to implement it.
For example, you can have the options defined in a parent, and you should
still be able to recognize their types. It gets quite complicated. I have
vague ideas about using type specifying extension (define some dummy
variables in the command's scope, see PHPStan\Type\Symfony\Helper), but
nothing concrete at the moment. You can certainly give it a go, I would
appreciate it!
Also, #20 <#20>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGZuDsPIILyokSH3szewiKT2d0kxXBQks5vNU8mgaJpZM4a7PQ->
.
--
Ondřej Mirtes
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a question, I'd be interested in implementing this, but not sure if its possible with Phpstan, so a point in the right direction would be useful.
In Symfony commands options (and arguments) are added in
configure
function, and this affects the return type of$input->getOption
later.So can I change the return type of
getOption
, according to the options that are configured?The text was updated successfully, but these errors were encountered: