Skip to content

Commit 523ac6e

Browse files
committed
remove support for the -h option in routes command
1 parent 5934bc1 commit 523ac6e

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

system/Commands/Utilities/Routes.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,6 @@ public function run(array $params)
8484
{
8585
$sortByHandler = array_key_exists('sort-by-handler', $params);
8686

87-
if (! $sortByHandler && array_key_exists('h', $params)) {
88-
// @todo to remove support in v4.8.0
89-
// Support -h as a shortcut but print a warning that it is not the intended use of -h.
90-
CLI::write('Warning: -h will be used as shortcut for --help in v4.8.0. Please use --sort-by-handler to sort by handler.', 'yellow');
91-
CLI::newLine();
92-
93-
$sortByHandler = true;
94-
}
95-
9687
$host = $params['host'] ?? null;
9788

9889
// Set HTTP_HOST

tests/system/Commands/Utilities/RoutesTest.php

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -117,41 +117,6 @@ public function testRoutesCommandSortByHandler(): void
117117
$this->assertStringContainsString($expected, $this->getBuffer());
118118
}
119119

120-
/**
121-
* @todo To remove this test and the backward compatibility for -h in v4.8.0.
122-
*/
123-
public function testRoutesCommandSortByHandlerUsingShortcutForBc(): void
124-
{
125-
Services::resetSingle('routes');
126-
127-
command('routes -h');
128-
129-
$expected = <<<'EOL'
130-
Warning: -h will be used as shortcut for --help in v4.8.0. Please use --sort-by-handler to sort by handler.
131-
132-
+---------+---------+---------------+----------------------------------------+----------------+---------------+
133-
| Method | Route | Name | Handler ↓ | Before Filters | After Filters |
134-
+---------+---------+---------------+----------------------------------------+----------------+---------------+
135-
| GET | closure | » | (Closure) | | |
136-
| GET | / | » | \App\Controllers\Home::index | | |
137-
| GET | testing | testing-index | \App\Controllers\TestController::index | | |
138-
| HEAD | testing | testing-index | \App\Controllers\TestController::index | | |
139-
| POST | testing | testing-index | \App\Controllers\TestController::index | | |
140-
| PATCH | testing | testing-index | \App\Controllers\TestController::index | | |
141-
| PUT | testing | testing-index | \App\Controllers\TestController::index | | |
142-
| DELETE | testing | testing-index | \App\Controllers\TestController::index | | |
143-
| OPTIONS | testing | testing-index | \App\Controllers\TestController::index | | |
144-
| TRACE | testing | testing-index | \App\Controllers\TestController::index | | |
145-
| CONNECT | testing | testing-index | \App\Controllers\TestController::index | | |
146-
| CLI | testing | testing-index | \App\Controllers\TestController::index | | |
147-
+---------+---------+---------------+----------------------------------------+----------------+---------------+
148-
EOL;
149-
$this->assertStringContainsString(
150-
$expected,
151-
(string) preg_replace('/\e\[[^m]+m/u', '', $this->getBuffer()),
152-
);
153-
}
154-
155120
public function testRoutesCommandHostHostname(): void
156121
{
157122
Services::resetSingle('routes');

0 commit comments

Comments
 (0)