bug #14422 Update DebugClassLoader.php (userfriendly)

This PR was merged into the 2.7 branch.

Discussion
----------

Update DebugClassLoader.php

Using name property of ReflectionClass instance in strncmp instead of __toString() return value, the latter seemed to breaking one of hte vendor bundles we use, and it seems fine now with the former.

Commits
-------

dcc6586 Update DebugClassLoader.php
This commit is contained in:
Fabien Potencier 2015-04-21 07:40:09 +02:00
commit c16930f9ae

View File

@ -195,7 +195,7 @@ class DebugClassLoader
}
$parent = $refl->getParentClass();
if (!$parent || strncmp($ns, $parent, $len)) {
if (!$parent || strncmp($ns, $parent->name, $len)) {
if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) {
trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED);
}