[Console] Misuse of ArgvInput
with arrays needs a better error handling
#53836
Labels
ArgvInput
with arrays needs a better error handling
#53836
Symfony version(s) affected
5.4
Description
Misuse of
ArgvInput
with array in $argv returns different PHP fatal errors, instead of some DX with a nice exception explaining the situation.The misuse :
Calling
bind()
method :Calling
hasParameterOption()
orgetParameterOption()
methods :How to reproduce
symfony/console
repotest.php
to throw the errorPossible Solution
Maybe we should prevent to pass array values in the
ArgvInput
constructor like :Additional Context
There is a kind of related issue with
ArrayInput
by @niklaswolf : #52580The text was updated successfully, but these errors were encountered: