zendframework/zf2 — pull request #1852 by weierophinney (2012-07-11 22:32:54+00:00)
Title: Remove Zend\Stdlib\SubClass

The main reason for this class was to work around changes in PHP between
versions 5.3.3 and 5.3.7 regarding how is_subclass_of() works. In the earlier
versions, it was buggy. In 5.3.7 and up, the bugs are fixed, and the solution is
very fast.

There are very few places in the framework where an is_subclass_of() test makes
sense, and those are typically only with classes responsible for creating other
classes -- factories, primarily. As such, the number of places where this will
be of use is minimal, and can be maintained.

The main goal is to have a consistent, performant way to do the check when
required, and one which will work with case sensitive contexts. The solution by
@prolic in #1807 is good; we just don't need to abstract this, particularly as
we'll be able to remove this entirely in ZF3. Additionally, abstracting it gives
additional dependencies for those components needing it, and in cases like
autoloaders, DI, and the service manager, the extra dependency is undesirable as
these should stand alone.

The code has been duplicated into each class requiring the lookup (I put the
check into AbstractPluginManager, as it's not unlikely other plugin managers may
need this).