When upgrading to Laravel v11 I have followed the upgrade guide but am getting a weird and wonderful error. My Pest v2 (and I tried v3) tests are returning a JSON body of:
array (
'exception' => 'ErrorException',
'message' => 'Undefined array key "items"',
This is happening when I return return CertificateResource::make($certificate); from the controller, but its nothing to do with the resource (returning an empty array doesnt work).
Removing \Illuminate\Routing\Middleware\SubstituteBindings::class, from Kernel.php $middlewareGroups api fixes it.
I dontk now what SubstituteBindings does or why we had it, but if it needs to be removed to work this may well need to be added to the upgrade guide so other people wont spend 2 hours trying to debug what the heck is going on trying random things one thing at a time. 🤣
Thank you for all the hard work!