Skip to content

Commit c2262b9

Browse files
committed
remove support for the -h option in routes command
1 parent 60fb195 commit c2262b9

2 files changed

Lines changed: 0 additions & 40 deletions

File tree

system/Commands/Utilities/Routes.php

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

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

9789
// Set HTTP_HOST

tests/system/Commands/Utilities/RoutesTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -117,38 +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 --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($expected, $this->getBuffer());
150-
}
151-
152120
public function testRoutesCommandHostHostname(): void
153121
{
154122
Services::resetSingle('routes');

0 commit comments

Comments
 (0)