Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Using SubstituteBindings in Lumen app shows "Target [Illuminate\Contracts\Routing\Registrar] is not instantiable while building [LaravelDoctrine\ORM\Middleware\SubstituteBindings]" #553

Open
RobQuistNL opened this issue Apr 3, 2023 · 0 comments

Comments

@RobQuistNL
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant