Bill Karwin wrote:
You could also consider using Zend_Log for deprecation messages.  Create a
Zend_Log object and store it in the Zend_Registry under a documented key,
such as 'Zend_Deprecation_Log'.  Each class or method that needs to report
deprecation would check the registry to see if that key exists and contains
a Zend_Log object.  If so, use it.  If no such object exists, then be
silent.  Zend_Log allows the developer to customize logging output,
including filtering levels.  Also you can create custom logging levels for
one or more deprecation levels.

So you'd leverage an existing part of ZF.  Unless of course Zend_Log becomes
deprecated!  ;-)


Leveraging existing components is always a good goal to strive for, but we should also consider what cost would be introduced by coupling every component with a deprecation to Zend_Log. In many cases, it would introduce a new dependency that doesn't currently exist. I don't have a feel for how big of a deal this is right now, but I figured it would be worth mentioning.

Regards,
Bryce Lohr

Reply via email to