ekino/EkinoNewRelicBundle

CommandListener relies on input arguments to have string keys

Opened this issue · 1 comments

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

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