PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 268435456 bytes) #40443
Unanswered
burhancelebi
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You've got recursive dependencies.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I used Service and Repository design patterns.
I created two Service Patterns called CartService and ProductVariantService and two Repositories called CartRepository and ProductVariantRepository.
I used CartService and ProductVariantRepository in ProductVariantService __construct method and i used CartRepository and ProductVariantService in CartService __construct method after that I got the error in the title.
I changed memory_limit to -1 but it couldn't solve the my problem.
But when i removed CartService in ProductVariantService __construct method and when i removed ProductVariantService in CartService __construct method i could start the project.
Something like that :
Beta Was this translation helpful? Give feedback.
All reactions