laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.62k stars 11.03k forks source link

[11.x] Allow `BackedEnum` when using `fromRoute()` in `MakesHttpRequests` #53593

Closed wietsewarendorff closed 1 day ago

wietsewarendorff commented 1 day ago

Since routes accept BackedEnums it makes sense to allow them when using fromRoute in tests too

wietsewarendorff commented 1 day ago

@crynobone thanks for the improvement

I prefer imports too, but I am unsure when to use it. Is there a rule? For example, it's not done here so I didn't import it in this PR. My goal is to do it right immediately next time.

taylorotwell commented 1 day ago

@wietsewarendorff we pretty much always import.