[2.7] [minor] [DebugClassLoader] Minor update in deprecation message
| Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Minor update for PHP version reference in deprecation message. Before: ``` Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7.0 ``` After: ``` Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7+ ```
This commit is contained in:
parent
b26077ba07
commit
bdc20e5252
@ -179,7 +179,7 @@ class DebugClassLoader
|
||||
}
|
||||
|
||||
if (in_array(strtolower($refl->getShortName()), self::$php7Reserved)) {
|
||||
trigger_error(sprintf('%s uses a reserved class name (%s) that will break on PHP 7.0', $name, $refl->getShortName()), E_USER_DEPRECATED);
|
||||
trigger_error(sprintf('%s uses a reserved class name (%s) that will break on PHP 7 and higher', $name, $refl->getShortName()), E_USER_DEPRECATED);
|
||||
} elseif (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) {
|
||||
self::$deprecated[$name] = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]);
|
||||
} else {
|
||||
|
@ -238,7 +238,7 @@ class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$xError = array(
|
||||
'type' => E_USER_DEPRECATED,
|
||||
'message' => 'Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7.0',
|
||||
'message' => 'Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7 and higher',
|
||||
);
|
||||
|
||||
$this->assertSame($xError, $lastError);
|
||||
|
Reference in New Issue
Block a user