re: When PHP Framework Sucks Series: Magic inside frameworks VIEW POST


I've seen the container pattern used in Symfony as a way to allow circular dependencies. If A requires B and B requires A, then one of those needs to require a container and resolve what it needs when it needs it, instead of in constructor.


I saw this where for some inexplicable reason people decided to never use a constructor and to only use getters and setters for each dependency.

code of conduct - report abuse