-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: spark routes
shows invalid routes with Auto Routing Improved
#7417
Conversation
// Skip the default controller. | ||
if (class_basename($class) === $defaultController) { | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just quick read, $class
and $defaultController
seems never replaced under loop, seems can be moved before loop to return early.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for review. But it cannot be moved before loop.
The method is a bit difficult to understand.
I refactored and and some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samsonasik I changed my mind. Please review #7419 when you have time.
5a527d4
to
d5ac6b5
Compare
d5ac6b5
to
a0578b3
Compare
To suppress Psalm error. ERROR: DuplicateArrayKey - system/Commands/Utilities/Routes/AutoRouterImproved/ControllerMethodReader.php:83:55 - String keys are not supported in unpacked arrays (see https://psalm.dev/151) $output = [...$output, ...$routeForDefaultController];
Go to #7419 |
Description
Fixes #7415
spark routes
shows the default controller's method routes that cannot be accessible.Checklist: