File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
system/Commands/Utilities Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -192,5 +192,30 @@ public function run(array $params)
192
192
}
193
193
194
194
CLI ::table ($ tbody , $ thead );
195
+
196
+ $ this ->showRequiredFilters ();
197
+ }
198
+
199
+ private function showRequiredFilters (): void
200
+ {
201
+ $ filterCollector = new FilterCollector ();
202
+
203
+ $ required = $ filterCollector ->getRequiredFilters ();
204
+
205
+ $ filters = [];
206
+
207
+ foreach ($ required ['before ' ] as $ filter ) {
208
+ $ filters [] = CLI ::color ($ filter , 'yellow ' );
209
+ }
210
+
211
+ CLI ::write ('Required Before Filters: ' . implode (', ' , $ filters ));
212
+
213
+ $ filters = [];
214
+
215
+ foreach ($ required ['after ' ] as $ filter ) {
216
+ $ filters [] = CLI ::color ($ filter , 'yellow ' );
217
+ }
218
+
219
+ CLI ::write (' Required After Filters: ' . implode (', ' , $ filters ));
195
220
}
196
221
}
Original file line number Diff line number Diff line change @@ -76,6 +76,15 @@ public function testRoutesCommand(): void
76
76
+---------+---------+---------------+----------------------------------------+----------------+---------------+
77
77
EOL;
78
78
$ this ->assertStringContainsString ($ expected , $ this ->getBuffer ());
79
+
80
+ $ expected = <<<'EOL'
81
+ Required Before Filters: forcehttps, pagecache
82
+ Required After Filters: pagecache, performance, toolbar
83
+ EOL;
84
+ $ this ->assertStringContainsString (
85
+ $ expected ,
86
+ preg_replace ('/\033\[.+?m/u ' , '' , $ this ->getBuffer ())
87
+ );
79
88
}
80
89
81
90
public function testRoutesCommandSortByHandler (): void
You can’t perform that action at this time.
0 commit comments