Skip to content

Commit d50e945

Browse files
Enable "native_constant_invocation" CS rule
1 parent 7d15cf4 commit d50e945

27 files changed

+71
-71
lines changed

Compiler/AutowireExceptionPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Compiler;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\AutowireExceptionPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the DefinitionErrorExceptionPass class instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\AutowireExceptionPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the DefinitionErrorExceptionPass class instead.', \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717

Compiler/AutowirePass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct($throwOnAutowireException = true)
5252
*/
5353
public function getAutowiringExceptions()
5454
{
55-
@trigger_error('Calling AutowirePass::getAutowiringExceptions() is deprecated since Symfony 3.4 and will be removed in 4.0. Use Definition::getErrors() instead.', E_USER_DEPRECATED);
55+
@trigger_error('Calling AutowirePass::getAutowiringExceptions() is deprecated since Symfony 3.4 and will be removed in 4.0. Use Definition::getErrors() instead.', \E_USER_DEPRECATED);
5656

5757
return $this->autowiringExceptions;
5858
}
@@ -85,7 +85,7 @@ public function process(ContainerBuilder $container)
8585
*/
8686
public static function createResourceForClass(\ReflectionClass $reflectionClass)
8787
{
88-
@trigger_error('The '.__METHOD__.'() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
88+
@trigger_error('The '.__METHOD__.'() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', \E_USER_DEPRECATED);
8989

9090
$metadata = [];
9191

@@ -304,7 +304,7 @@ private function getAutowiredReference(TypedReference $reference, $deprecationMe
304304
$message .= sprintf(' You should %s the "%s" service to "%s" instead.', isset($this->types[$this->types[$type]]) ? 'alias' : 'rename (or alias)', $this->types[$type], $type);
305305
}
306306

307-
@trigger_error($message, E_USER_DEPRECATED);
307+
@trigger_error($message, \E_USER_DEPRECATED);
308308

309309
return new TypedReference($this->types[$type], $type);
310310
}
@@ -444,7 +444,7 @@ private function createAutowiredDefinition($type)
444444
$this->currentId = $currentId;
445445
}
446446

447-
@trigger_error(sprintf('Relying on service auto-registration for type "%s" is deprecated since Symfony 3.4 and won\'t be supported in 4.0. Create a service named "%s" instead.', $type, $type), E_USER_DEPRECATED);
447+
@trigger_error(sprintf('Relying on service auto-registration for type "%s" is deprecated since Symfony 3.4 and won\'t be supported in 4.0. Create a service named "%s" instead.', $type, $type), \E_USER_DEPRECATED);
448448

449449
$this->container->log($this, sprintf('Type "%s" has been auto-registered for service "%s".', $type, $this->currentId));
450450

Compiler/Compiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getServiceReferenceGraph()
6262
public function getLoggingFormatter()
6363
{
6464
if (null === $this->loggingFormatter) {
65-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
65+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), \E_USER_DEPRECATED);
6666

6767
$this->loggingFormatter = new LoggingFormatter();
6868
}
@@ -84,7 +84,7 @@ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BE
8484
if (__CLASS__ !== static::class) {
8585
$r = new \ReflectionMethod($this, __FUNCTION__);
8686
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
87-
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
87+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), \E_USER_DEPRECATED);
8888
}
8989
}
9090

@@ -103,7 +103,7 @@ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BE
103103
*/
104104
public function addLogMessage($string)
105105
{
106-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
106+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), \E_USER_DEPRECATED);
107107

108108
$this->log[] = $string;
109109
}

Compiler/DecoratorServicePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DecoratorServicePass implements CompilerPassInterface
2626
public function process(ContainerBuilder $container)
2727
{
2828
$definitions = new \SplPriorityQueue();
29-
$order = PHP_INT_MAX;
29+
$order = \PHP_INT_MAX;
3030

3131
foreach ($container->getDefinitions() as $id => $definition) {
3232
if (!$decorated = $definition->getDecoratedService()) {

Compiler/FactoryReturnTypePass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FactoryReturnTypePass implements CompilerPassInterface
2727
public function __construct(ResolveClassPass $resolveClassPass = null)
2828
{
2929
if (null === $resolveClassPass) {
30-
@trigger_error('The '.__CLASS__.' class is deprecated since Symfony 3.3 and will be removed in 4.0.', E_USER_DEPRECATED);
30+
@trigger_error('The '.__CLASS__.' class is deprecated since Symfony 3.3 and will be removed in 4.0.', \E_USER_DEPRECATED);
3131
}
3232
$this->resolveClassPass = $resolveClassPass;
3333
}
@@ -104,7 +104,7 @@ private function updateDefinition(ContainerBuilder $container, $id, Definition $
104104
}
105105

106106
if (null !== $returnType && (!isset($resolveClassPassChanges[$id]) || $returnType !== $resolveClassPassChanges[$id])) {
107-
@trigger_error(sprintf('Relying on its factory\'s return-type to define the class of service "%s" is deprecated since Symfony 3.3 and won\'t work in 4.0. Set the "class" attribute to "%s" on the service definition instead.', $id, $returnType), E_USER_DEPRECATED);
107+
@trigger_error(sprintf('Relying on its factory\'s return-type to define the class of service "%s" is deprecated since Symfony 3.3 and won\'t work in 4.0. Set the "class" attribute to "%s" on the service definition instead.', $id, $returnType), \E_USER_DEPRECATED);
108108
}
109109
$definition->setClass($returnType);
110110
}

Compiler/InlineServiceDefinitionsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function setRepeatedPass(RepeatedPass $repeatedPass)
4545
*/
4646
public function getInlinedServiceIds()
4747
{
48-
@trigger_error('Calling InlineServiceDefinitionsPass::getInlinedServiceIds() is deprecated since Symfony 3.4 and will be removed in 4.0.', E_USER_DEPRECATED);
48+
@trigger_error('Calling InlineServiceDefinitionsPass::getInlinedServiceIds() is deprecated since Symfony 3.4 and will be removed in 4.0.', \E_USER_DEPRECATED);
4949

5050
return $this->inlinedServiceIds;
5151
}

Compiler/LoggingFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Compiler;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\LoggingFormatter class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\LoggingFormatter class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', \E_USER_DEPRECATED);
1515

1616
/**
1717
* Used to format logging messages during the compilation.

Compiler/PassConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_O
126126
if (__CLASS__ !== static::class) {
127127
$r = new \ReflectionMethod($this, __FUNCTION__);
128128
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
129-
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
129+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), \E_USER_DEPRECATED);
130130
}
131131
}
132132

Compiler/ResolveDefinitionTemplatesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Compiler;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\ResolveDefinitionTemplatesPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the ResolveChildDefinitionsPass class instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\ResolveDefinitionTemplatesPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the ResolveChildDefinitionsPass class instead.', \E_USER_DEPRECATED);
1515

1616
class_exists(ResolveChildDefinitionsPass::class);
1717

Config/AutowireServiceResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Config;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
1717
use Symfony\Component\DependencyInjection\Compiler\AutowirePass;

0 commit comments

Comments
 (0)