orm
orm copied to clipboard
[BUG] Using SubstituteBindings in Lumen app shows "Target [Illuminate\Contracts\Routing\Registrar] is not instantiable while building [LaravelDoctrine\ORM\Middleware\SubstituteBindings]"
Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].
Package 1.7.11, Lumen 8.3.4
Expected behaviour
Getting routes with entities in there resolved nicely.
Actual behaviour
When adding the LaravelDoctrine\ORM\Middleware\SubstituteBindings
middleware in the routeMiddleware, we get the following error:
Illuminate\Contracts\Container\BindingResolutionException
Target [Illuminate\Contracts\Routing\Registrar] is not instantiable while building [LaravelDoctrine\ORM\Middleware\SubstituteBindings].
When we don't have this middleware, the URL resolves, but receives an uninitialized object;
Typed property App\Models\Location\Building::$id must not be accessed before initialization