Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Remove Zend\Stdlib\SubClass
Browse files Browse the repository at this point in the history
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 zendframework/zendframework#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).
  • Loading branch information
weierophinney committed Jul 11, 2012
1 parent d01cf3a commit 509f72e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
30 changes: 0 additions & 30 deletions test/SubClassTest.php

This file was deleted.

16 changes: 0 additions & 16 deletions test/TestAsset/DummySubclasses.php

This file was deleted.

0 comments on commit 509f72e

Please sign in to comment.