-
Notifications
You must be signed in to change notification settings - Fork 90
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
Command::addOption()'s $default expects wrong array format #47
Comments
Yep, I see. Thanks, I'll fix it asap. |
Level 0? Argument types are not checked until level 5.
On Thu, 2 May 2019 at 06:42, Lukáš Unger ***@***.***> wrote:
Yep, I see. Thanks, I'll fix it asap.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOF6RUC6SZM5PJVE3IDPTLHTTANCNFSM4HJ5PI4Q>
.
--
Ondřej Mirtes
|
@ondrejmirtes Yes, it's strange but it's really reported on level 0 already.
|
That's because the rule doesn't care about levels. I might change that too. |
You can inject the same parameters PHPStan uses in config.level5.neon.
On Thu, 2 May 2019 at 09:57, Lukáš Unger ***@***.***> wrote:
That's because the rule doesn't care about levels. I might change that too.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOF2FYIL4RJPGWMXE6LPTL6ONANCNFSM4HJ5PI4Q>
.
--
Ondřej Mirtes
|
Fixed in c4da70e |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Symfony 4.0 documents
Symfony\Component\Console\Command\Command::addOption()
's 5th parameter$default
asmixed
.When using default values with
InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL
mode, the$default
parameter expectsarray<int, string>|null
.This is wrong because keys are irrelevant and leads to error like this:
Happens when
$default
is given an array documented asstring[]
.Sample code:
This error pops up at level 0 only with this extension enabled, not without it.
The text was updated successfully, but these errors were encountered: