Closed Livijn closed 1 year ago
Summoning @shaffe-fr, would you happen to have an idea how to fix this?
Hey @Livijn, can you show us the failing test? Thanks
Well, it's pretty basic.
Controller:
public function destroy(Request $request, $slug)
{
$request->validate([
'delete_reason' => 'required|enum_value:'.AdDeleteReason::class.',false',
]);
}
Test:
$this->delete(route('ads.destroy', ['slug' => $ad->slug]), ['delete_reason' => AdDeleteReason::Other])
->assertSuccessful();
Do you register EnumServiceProvider
manually?
No, and I can see the make:enum
command registered if I use php artisan list
.
@Livijn Can you try #327?
It works! :)
Fixed with v6.4.1.
Great, sorry for the hiccup!
When I updated to 6.4.0 my tests are throwing exceptions:
Pretty sure it's related to this: https://github.com/BenSampo/laravel-enum/pull/324