Skip to content

Commit

Permalink
[2.7] Fix unsilenced deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 16, 2015
1 parent f88cfd1 commit dae98e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Debug/DebugClassLoader.php
Expand Up @@ -179,7 +179,7 @@ public function loadClass($class)
}

if (in_array(strtolower($refl->getShortName()), self::$php7Reserved)) {
trigger_error(sprintf('%s uses a reserved class name (%s) that will break on PHP 7 and higher', $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 {
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/HttpKernel/Tests/Logger.php
Expand Up @@ -91,7 +91,7 @@ public function debug($message, array $context = array())
*/
public function emerg($message, array $context = array())
{
trigger_error('Use emergency() which is PSR-3 compatible', E_USER_DEPRECATED);
@trigger_error('Use emergency() which is PSR-3 compatible', E_USER_DEPRECATED);

$this->log('emergency', $message, $context);
}
Expand All @@ -101,7 +101,7 @@ public function emerg($message, array $context = array())
*/
public function crit($message, array $context = array())
{
trigger_error('Use critical() which is PSR-3 compatible', E_USER_DEPRECATED);
@trigger_error('Use critical() which is PSR-3 compatible', E_USER_DEPRECATED);

$this->log('critical', $message, $context);
}
Expand All @@ -111,7 +111,7 @@ public function crit($message, array $context = array())
*/
public function err($message, array $context = array())
{
trigger_error('Use error() which is PSR-3 compatible', E_USER_DEPRECATED);
@trigger_error('Use error() which is PSR-3 compatible', E_USER_DEPRECATED);

$this->log('error', $message, $context);
}
Expand All @@ -121,7 +121,7 @@ public function err($message, array $context = array())
*/
public function warn($message, array $context = array())
{
trigger_error('Use warning() which is PSR-3 compatible', E_USER_DEPRECATED);
@trigger_error('Use warning() which is PSR-3 compatible', E_USER_DEPRECATED);

$this->log('warning', $message, $context);
}
Expand Down
Expand Up @@ -36,7 +36,7 @@ public function __construct($value, $path, $pathIndex = null)
$path->getElement($pathIndex)
);
} else {
trigger_error('The '.__CLASS__.' constructor now expects 3 arguments: the invalid property value, the '.__NAMESPACE__.'\PropertyPathInterface object and the current index of the property path.', E_USER_DEPRECATED);
@trigger_error('The '.__CLASS__.' constructor now expects 3 arguments: the invalid property value, the '.__NAMESPACE__.'\PropertyPathInterface object and the current index of the property path.', E_USER_DEPRECATED);

$message = sprintf(
'Expected argument of type "%s", "%s" given',
Expand Down

0 comments on commit dae98e0

Please sign in to comment.