File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 55namespace CodeIgniter \Shield \Commands ;
66
77use CodeIgniter \CLI \BaseCommand as FrameworkBaseCommand ;
8+ use CodeIgniter \CLI \Commands ;
89use CodeIgniter \Shield \Commands \Utils \InputOutput ;
10+ use Psr \Log \LoggerInterface ;
911
1012abstract class BaseCommand extends FrameworkBaseCommand
1113{
@@ -19,6 +21,13 @@ abstract class BaseCommand extends FrameworkBaseCommand
1921 */
2022 protected $ group = 'Shield ' ;
2123
24+ public function __construct (LoggerInterface $ logger , Commands $ commands )
25+ {
26+ parent ::__construct ($ logger , $ commands );
27+
28+ $ this ->ensureInputOutput ();
29+ }
30+
2231 /**
2332 * Asks the user for input.
2433 *
Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ class User extends BaseCommand
126126 */
127127 public function run (array $ params ): int
128128 {
129- $ this ->ensureInputOutput ();
130129 $ this ->setTables ();
131130 $ this ->setValidationRules ();
132131
You can’t perform that action at this time.
0 commit comments