Support the ongoing development of Laravel.io →
posted 9 years ago
IOC
Last updated 1 year ago.
0

I think I've seen this error about a year ago, seems you have endless recursion in your PHP. If A requires B and B requires, you have an infinite loop. Or if A is a dependency of B, and B is a dependency of C, and C is a dependency of A, same thing.

Binding to the container is easy:

App::bind('Interface', 'ConcreteClass');
Last updated 1 year ago.
0

@maurocasas Just for sure you're doing it right. Does your script violate the SOLID principles? I mean, it should not have something like A depends B and B depends A at the same time. You can solve this problem by re-design your application's structure like: Make a service layer like PaymentService built on top of Wallet repo and Transaction repo, any functions that the Wallet needs from Transaction and vice-versa will be moved to the service.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

maurocasas maurocasas Joined 25 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.