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