Closed sagikazarmark closed 8 years ago
I changed my mind :smile: I better implement it in my project by myself.
Actually it violates a few SOLID principles. Also, these factories are implemented on their own (MessageFactory, StreamFactory, etc). How would you implement them in one class? Multiple inheritance is missing from PHP, traits are kind of replacement, but do not provide real solution (implementing factories as traits is not a good idea). If you can provide any viable use case, then I would reconsider removing it, but right now, I don't see the added value of this interface (actually, quite the opposite).
if we see the need for something like this, we better have a concrete class that aggregates the 3 interfaces and forwards the methods. the use case of reducing the number of dependencies seems ok to me - if a class needs factories for all 3 things. but lets remove the interface for now, yes.
@sagikazarmark, that's why I changed my mind, just couldn't put it into English words.
Cool. :+1: The important thing is we understood each other at the end. :smile:
I'd like to keep this interface. Actually I've already planned to use it to minimize injected dependency count.