Using the ArgvInput together with the applications InputDefinition was a bad idea. The reason why ArgvInput was used was to synchronize input definition so there is no need for duplication.
Sadly, the ArgvInput does some kind of validation when binding the definition and as the command definition is not yet loaded, an exception is thrown.
Since we ignore that exception and skip loading the container, the application is starting up, searches for the command, cannot find any command (as container detection was skipped) and that leads to unexpected behavior.
Symfony itself ignores validation exceptions before the command itself is loaded but that wont be a solution for this library.
To avoid being interrupted by symfony while detecting the --container option, this PR introduces a lightweight long-options detection which focuses on detecting only the --container option.
Description
Using the
ArgvInput
together with the applicationsInputDefinition
was a bad idea. The reason whyArgvInput
was used was to synchronize input definition so there is no need for duplication. Sadly, theArgvInput
does some kind of validation when binding the definition and as the command definition is not yet loaded, an exception is thrown.Since we ignore that exception and skip loading the container, the application is starting up, searches for the command, cannot find any command (as container detection was skipped) and that leads to unexpected behavior.
Symfony itself ignores validation exceptions before the command itself is loaded but that wont be a solution for this library.
To avoid being interrupted by symfony while detecting the
--container
option, this PR introduces a lightweight long-options detection which focuses on detecting only the--container
option.closes #74