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

CommandListener relies on input arguments to have string keys #234

Open
sawmurai opened this issue Oct 10, 2019 · 1 comment
Open

CommandListener relies on input arguments to have string keys #234

sawmurai opened this issue Oct 10, 2019 · 1 comment

Comments

@sawmurai
Copy link

The Listener/CommandListener depends on the keys of the array returned from $input->getArguments() to be strings. However depending on how $input is instantiated, it is possible that those keys are integers. This leads to an error because of strict type hinting.

Now, I think that under normal circumstances this does not happen. But, for example, if you are using https://github.com/liip/LiipFunctionalTestBundle in version 1.* and have an integration test that runs a command, the command name is added as argument without command_name: https://github.com/liip/LiipFunctionalTestBundle/blob/1.x/Test/WebTestCase.php#L146

I guess my questions is: Do you think ConsoleListener should be able to handle integer keys or not. If yes: I can provide a PR

@jderusse
Copy link
Collaborator

hello @sawmurai , thank for reporting it. Would you mind to open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants