Skip to content

Commit 9cc9347

Browse files
committed
Merge branch 'update-ai-commands' of https://github.com/flightphp/core into update-ai-commands
2 parents e73b4e3 + 175e9eb commit 9cc9347

File tree

9 files changed

+967
-54
lines changed

9 files changed

+967
-54
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
10+
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout repository
@@ -20,4 +20,4 @@ jobs:
2020
extensions: curl, mbstring
2121
tools: composer:v2
2222
- run: composer install
23-
- run: composer test-ci
23+
- run: composer test-ci

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"phpstan/phpstan": "^2.1",
5252
"phpunit/phpunit": "^9.6",
5353
"rregeer/phpunit-coverage-check": "^0.3.1",
54-
"spatie/phpunit-watcher": "^1.23 || ^1.24",
5554
"squizlabs/php_codesniffer": "^3.11"
5655
},
5756
"config": {

flight/commands/RouteCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ public function execute()
6565
if (!empty($route->middleware)) {
6666
try {
6767
$middlewares = array_map(function ($middleware) {
68-
$middleware_class_name = explode("\\", get_class($middleware));
68+
if (is_string($middleware)) {
69+
$middleware_class_name = explode("\\", $middleware);
70+
} else {
71+
$middleware_class_name = explode("\\", get_class($middleware));
72+
}
6973
return preg_match("/^class@anonymous/", end($middleware_class_name)) ? 'Anonymous' : end($middleware_class_name);
7074
}, $route->middleware);
7175
} catch (\TypeError $e) {

0 commit comments

Comments
 (0)