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

Give New Application to Routes #899

Merged
merged 2 commits into from
May 30, 2024

Conversation

dbpolito
Copy link
Contributor

Routes instances are still referencing the old container...

I was hitting this error in a filament / livewire app, more specifically here: https://github.com/livewire/livewire/blob/main/src/Mechanisms/PersistentMiddleware/PersistentMiddleware.php#L149

Using cached routes does not hit this problem, that's why i'm only doing to uncached routes.

@taylorotwell
Copy link
Member

What actually goes wrong?

@dbpolito
Copy link
Contributor Author

dbpolito commented May 28, 2024

It's a very specific error, if a have a Controller with some injection on __construct, it throws this error:

Target [xxxContract] is not instantiable while building [xxxController, xxxRepository].

As the route is already loaded but referencing the old container, it's trying to inject using the wrong container, which probably got cleared.

The error happens on the livewire action, at the livewire.update ajax.

@taylorotwell taylorotwell merged commit 2a5028a into laravel:2.x May 30, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants