@@ -414,8 +414,8 @@ public function validateInput(): bool
414414 $ shortNames = $ conf ['shortcut ' ] ? explode ('| ' , $ conf ['shortcut ' ]) : [];
415415 if ($ srt = $ in ->findOneShortOpts ($ shortNames )) {
416416 $ opts [$ name ] = $ in ->sOpt ($ srt );
417- } elseif ($ conf ['default ' ]) {
418-
417+ } elseif ($ conf ['default ' ] !== null ) {
418+ $ opts [ $ name ] = $ conf [ ' default ' ];
419419 } elseif ($ conf ['required ' ]) {
420420 $ missingOpts [] = "-- {$ name }" . ($ srt ? "|- {$ srt }" : '' );
421421 }
@@ -606,8 +606,10 @@ protected function showHelpByMethodAnnotations(string $method, string $action =
606606 $ ref = new ReflectionClass ($ this );
607607 $ name = $ this ->input ->getCommand ();
608608
609- $ this ->logf (Console::VERB_CRAZY , 'display help info for the method=%s, action=%s, class=%s ' , $ method , $ action ,
610- static ::class);
609+ $ this ->log (Console::VERB_CRAZY , "display help info for the method= $ method " , [
610+ 'class ' => static ::class,
611+ 'action ' => $ action ,
612+ ]);
611613
612614 if (!$ ref ->hasMethod ($ method )) {
613615 $ this ->write ("The command [<info> $ name</info>] don't exist in the group: " . static ::getName ());
@@ -663,7 +665,7 @@ protected function showHelpByMethodAnnotations(string $method, string $action =
663665
664666 if (isset ($ help ['Description: ' ])) {
665667 $ description = $ help ['Description: ' ] ?: 'No description message for the command ' ;
666- $ this ->write (ucfirst ($ description ) . PHP_EOL );
668+ $ this ->write (ucfirst ($ this -> parseCommentsVars ( $ description) ) . PHP_EOL );
667669 unset($ help ['Description: ' ]);
668670 }
669671
@@ -805,6 +807,20 @@ public function logf(int $level, string $format, ...$args): void
805807 Console::logf ($ level , $ format , ...$ args );
806808 }
807809
810+ /**
811+ * @param int $level
812+ * @param string $message
813+ * @param array $extra
814+ */
815+ public function log (int $ level , string $ message , array $ extra = []): void
816+ {
817+ if ($ this ->getVerbLevel () < $ level ) {
818+ return ;
819+ }
820+
821+ Console::log ($ message , $ extra , $ level );
822+ }
823+
808824 /**
809825 * @return InputDefinition|null
810826 */
0 commit comments