ZF-7252: Zend_Controller_Action_Interface breaks OOP convention
I ran into a problem with this interface as implemented in 1.8.4 (possibly earlier), in that my test harness defines classes for each controller under test, as described in this article:
to the point, I am extending a controller and changing the constructor (and its signature) in the derived class. This is not possible with the new Zend_Controller_Action_Interface.
I know supporting this method is not the concern of ZF, but the new interface does break this approach. The larger problem is that it breaks general OOP design principles, in that derived classes should be free to instantiate themselves however they see fit. With the new interface, ANY class implementing Zend_Controller_Action_Interface - INCLUDING any class that extends Zend_Controller_Action - must have that constructor signature. This just seems wrong. In fact, I found much supporting arguments for all sorts of OO languages when doing a quick google search on this subject: http://google.com/search/?q=interface+constructor
This is my first ZF ticket, so I apologize for not having a lot of the history here. But I hope this causes some second thoughts about placing constructors in the interface, thereby enforcing needless constraints on any derived classes.