Closed lepikhinb closed 1 month ago
@reinink made AlwaysProp
accept any values including callable 👌🏻
@lepikhinb Hey thanks for putting this together! 💪
@lepikhinb "errors" prop is empty with laravel validation after this update
After updating to v1.3.0, no errors are included in the response; it is always empty.
This issue did not occur in v1.2.0.
@reinink, could you please look into this?
@datlechin @gabrielrbarbosa I couldn't reproduce the issue. Is there a chance you can make a quick reproduction?
@lepikhinb Create a route that performs data validation. Send a request to this route with invalid data and verify that the response does not contain any error messages.
@datlechin Please make a repo with a complete reproduction.
Here's PingCRM with Inertia 1.3.
Ah i see that what happened
Previously, I used the appendTo
method to add Inertia’s middleware, which was works with versions prior to v1.3.0:
->withMiddleware(function (Middleware $middleware) {
$middleware->appendTo(HandleInertiaRequests::class);
})
After updating to v1.3.0, the approach needs to be changed. Now, you must use the web
method to add Inertia’s middleware.
@lepikhinb I found out what happened here. We had previously overridden the Response class which made this new update incompatible, I will handle this here or just fix at 1.2.0 for now, thanks anyway!
Introduce
Inertia::always()
wrapper to replace the current persistent props implementation.Lazy data evaluation behavior: