Closed Programie closed 7 years ago
The Travis CI builds are failing. Now I understand why _completion
command wasn't marked as hidden initially. The hidden command functionality was added in Symfony Console 3.2 only and this library works with Symfony Console 2.x or 3.x.
So I guess you need to create polyfill for hidden commands for Symfony 2.x or do some clever tricks, like:
_completion
command all the timeisHidden
method is present (check it only on 1st command and then save result to variable), then use it, otherwise consider command as visible.
Thanks @Programie and @aik099. Looks good once @aik099's changes are made 👍
I will try to implement support for Symfony 2.x. All other suggestions are now implemented.
Currently the builds are still failing, as I'm using setHidden() in the HiddenCommand test class.
How would you test a hidden command if command hiding is not supported in Symfony 2.x?
Simply not adding the command if setHidden() method does not exist might be not the best way. How about overwriting setHidden and isHidden in the HiddenCommand class?
How about overwriting setHidden and isHidden in the HiddenCommand class?
That would rely on fact, that methods are not final currently and stay not final in future.
Instead I recommend adding HiddenCommand
in test suite configuration only when such setHidden
method exists in base command class. That would make sure code is executed when Travis uses Symfony 3 (PHP 5.6 and PHP 7.x if I'm not mistaken).
Once all tests pass (on Travis CI) consider PR approved from my side.
The normal PHP test builds are now passing, but the HHVM build is failing because of some Debian package conflicts.
Thanks @Programie 👍
Fix #74