ZF-3085: Zend_InfoCard::__construct() throws exceptions for dependencies outside of instantiation

Issue Type: Improvement Created: 2008-04-09T13:31:48.000+0000 Last Updated: 2012-08-31T09:05:17.000+0000 Status: Open Fix version(s): Reporter: Darby Felton (darby) Assignee: John Coggeshall (coogle) Tags: - Zend_InfoCard

Related issues: Attachments:


I think it's probably not the best solution that the constructor throws an exception when mcrypt (or openssl) is not available, since the constructor per se does not need it. Usually it's better to have dependency checking closer to where the dependency actually exists, as it reduces coupling, provides the ability for independent functionality to be used and tested, and supports the ability to provide alternative implementations that do not require the dependencies (e.g., Zend_OpenId and Zend_Json act somewhat this way with respect to the GMP and json extensions, respectively).


Posted by Wil Sinclair (wil) on 2009-01-20T17:13:18.000+0000

John, what's your take on this? I think it makes sense.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.