-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
BackedEnum on Route already resolved #51583
Comments
Should be able to backport #51525 to 10.x branch |
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
Port a078b1a (Fixes explicit route binding with `BackedEnum` (laravel#51525), 2024-05-21 crynobone) to 10.x (from 11.x). fixes laravel#51583 refs laravel#51514 Signed-off-by: CAAHS <[email protected]>
Thanks for the pointers. Looks like the exact same change. We were able to file a PR or two, this is the open one: #51586 @crynobone |
Port a078b1a (Fixes explicit route binding with `BackedEnum` (laravel#51525), 2024-05-21 crynobone) to 10.x (from 11.x). fixes laravel#51583 refs laravel#51514 Signed-off-by: CAAHS <[email protected]>
Laravel Version
10.48.11
PHP Version
8.1.28
Database Driver & Version
No response
Description
Given the
$parameterValue
on the route is already resolved, do not try to resolve it from stringable any longer.Otherwise an error (current behavior):
Error occured first during an update of livewire/livewire:
(isolated change, from livewire/livewire:v3.3.1...latest the error retains)
We have a trivial patch in \Illuminate\Routing\ImplicitRouteBinding::resolveBackedEnumsForRoute:
and do see this is induced by Livewire.
From the type of change we believe this is a good fit for supporting (String)BackedEnums on Routes.
Please let us know if this is not too far off, then we would create a pull request.
Please share your recommendations.
Steps To Reproduce
Wire a route with a backed enum parameter
Inject the enum, directly or indirectly (e.g. use Livewire)
Error throws at vendor/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php:89
The text was updated successfully, but these errors were encountered: