File tree Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,7 @@ protected function configure()
3434 );
3535
3636 // Hide this command from listing if supported
37- // Command::setHidden() was not available before Symfony 3.2.0
38- if (method_exists ($ this , 'setHidden ' )) {
39- $ this ->setHidden (true );
40- }
37+ $ this ->setHidden (true );
4138 }
4239
4340 /**
Original file line number Diff line number Diff line change @@ -451,28 +451,15 @@ protected function getAllOptions()
451451 */
452452 protected function getCommandNames ()
453453 {
454- // Command::Hidden isn't supported before Symfony Console 3.2.0
455- // We don't complete hidden command names as these are intended to be private
456- if (method_exists ('\Symfony\Component\Console\Command\Command ' , 'isHidden ' )) {
457- $ commands = array ();
458-
459- foreach ($ this ->application ->all () as $ name => $ command ) {
460- if (!$ command ->isHidden ()) {
461- $ commands [] = $ name ;
462- }
463- }
464-
465- return $ commands ;
466-
467- } else {
468-
469- // Fallback for compatibility with Symfony Console < 3.2.0
470- // This was the behaviour prior to pull #75
471- $ commands = $ this ->application ->all ();
472- unset($ commands ['_completion ' ]);
454+ $ commands = array ();
473455
474- return array_keys ($ commands );
456+ foreach ($ this ->application ->all () as $ name => $ command ) {
457+ if (!$ command ->isHidden ()) {
458+ $ commands [] = $ name ;
459+ }
475460 }
461+
462+ return $ commands ;
476463 }
477464
478465 /**
You can’t perform that action at this time.
0 commit comments