Skip to content

Commit fc9fd3b

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 384c260 + d50e945 commit fc9fd3b

26 files changed

+48
-48
lines changed

Compiler/AnalyzeServiceReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(bool $onlyConstructorArguments = false, bool $hasPro
5353
*/
5454
public function setRepeatedPass(RepeatedPass $repeatedPass)
5555
{
56-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
56+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED);
5757
}
5858

5959
/**

Compiler/DecoratorServicePass.php

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

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

Compiler/InlineServiceDefinitionsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(AnalyzeServiceReferencesPass $analyzingPass = null)
4343
*/
4444
public function setRepeatedPass(RepeatedPass $repeatedPass)
4545
{
46-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
46+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED);
4747
$this->repeatedPass = $repeatedPass;
4848
}
4949

Compiler/RemoveUnusedDefinitionsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class RemoveUnusedDefinitionsPass extends AbstractRecursivePass implements Repea
2929
*/
3030
public function setRepeatedPass(RepeatedPass $repeatedPass)
3131
{
32-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
32+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED);
3333
}
3434

3535
/**

Compiler/RepeatedPass.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(sprintf('The "%s" class is deprecated since Symfony 4.2.', RepeatedPass::class), E_USER_DEPRECATED);
14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', RepeatedPass::class), \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;

Compiler/ResolveReferencesToAliasesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private function getDefinitionId(string $id, ContainerBuilder $container): strin
6262
$alias = $container->getAlias($id);
6363

6464
if ($alias->isDeprecated()) {
65-
@trigger_error(sprintf('%s. It is being referenced by the "%s" %s.', rtrim($alias->getDeprecationMessage($id), '. '), $this->currentId, $container->hasDefinition($this->currentId) ? 'service' : 'alias'), E_USER_DEPRECATED);
65+
@trigger_error(sprintf('%s. It is being referenced by the "%s" %s.', rtrim($alias->getDeprecationMessage($id), '. '), $this->currentId, $container->hasDefinition($this->currentId) ? 'service' : 'alias'), \E_USER_DEPRECATED);
6666
}
6767

6868
$seen = [];

Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function get($id, $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERE
231231
?? ('service_container' === $id ? $this : ($this->factories[$id] ?? [$this, 'make'])($id, $invalidBehavior));
232232

233233
if (!\is_object($service) && null !== $service) {
234-
@trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.', $id, \gettype($service)), E_USER_DEPRECATED);
234+
@trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.', $id, \gettype($service)), \E_USER_DEPRECATED);
235235
}
236236

237237
return $service;

ContainerBuilder.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public function getCompiler()
492492
public function set($id, $service)
493493
{
494494
if (!\is_object($service) && null !== $service) {
495-
@trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, setting the "%s" service to a value of type "%s" should be avoided.', $id, \gettype($service)), E_USER_DEPRECATED);
495+
@trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, setting the "%s" service to a value of type "%s" should be avoided.', $id, \gettype($service)), \E_USER_DEPRECATED);
496496
}
497497

498498
$id = (string) $id;
@@ -558,7 +558,7 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV
558558
$service = $this->doGet($id, $invalidBehavior);
559559

560560
if (!\is_object($service) && null !== $service) {
561-
@trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.', $id, \gettype($service)), E_USER_DEPRECATED);
561+
@trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.', $id, \gettype($service)), \E_USER_DEPRECATED);
562562
}
563563

564564
return $service;
@@ -590,7 +590,7 @@ private function doGet(string $id, int $invalidBehavior = ContainerInterface::EX
590590
$alias = $this->aliasDefinitions[$id];
591591

592592
if ($alias->isDeprecated()) {
593-
@trigger_error($alias->getDeprecationMessage($id), E_USER_DEPRECATED);
593+
@trigger_error($alias->getDeprecationMessage($id), \E_USER_DEPRECATED);
594594
}
595595

596596
return $this->doGet((string) $alias, $invalidBehavior, $inlineServices, $isConstructorArgument);
@@ -1092,7 +1092,7 @@ private function createService(Definition $definition, array &$inlineServices, b
10921092
}
10931093

10941094
if ($definition->isDeprecated()) {
1095-
@trigger_error($definition->getDeprecationMessage($id), E_USER_DEPRECATED);
1095+
@trigger_error($definition->getDeprecationMessage($id), \E_USER_DEPRECATED);
10961096
}
10971097

10981098
if ($tryProxy && $definition->isLazy() && !$tryProxy = !($proxy = $this->proxyInstantiator) || $proxy instanceof RealServiceInstantiator) {
@@ -1135,7 +1135,7 @@ private function createService(Definition $definition, array &$inlineServices, b
11351135
$r = new \ReflectionClass($factory[0]);
11361136

11371137
if (0 < strpos($r->getDocComment(), "\n * @deprecated ")) {
1138-
@trigger_error(sprintf('The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name), E_USER_DEPRECATED);
1138+
@trigger_error(sprintf('The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name), \E_USER_DEPRECATED);
11391139
}
11401140
}
11411141
} else {
@@ -1144,7 +1144,7 @@ private function createService(Definition $definition, array &$inlineServices, b
11441144
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
11451145

11461146
if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ")) {
1147-
@trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), E_USER_DEPRECATED);
1147+
@trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), \E_USER_DEPRECATED);
11481148
}
11491149
}
11501150

Definition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ public function getDecoratedService()
186186
public function setClass($class)
187187
{
188188
if ($class instanceof Parameter) {
189-
@trigger_error(sprintf('Passing an instance of %s as class name to %s in deprecated in Symfony 4.4 and will result in a TypeError in 5.0. Please pass the string "%%%s%%" instead.', Parameter::class, __CLASS__, (string) $class), E_USER_DEPRECATED);
189+
@trigger_error(sprintf('Passing an instance of %s as class name to %s in deprecated in Symfony 4.4 and will result in a TypeError in 5.0. Please pass the string "%%%s%%" instead.', Parameter::class, __CLASS__, (string) $class), \E_USER_DEPRECATED);
190190
}
191191
if (null !== $class && !\is_string($class)) {
192-
@trigger_error(sprintf('The class name passed to %s is expected to be a string. Passing a %s is deprecated in Symfony 4.4 and will result in a TypeError in 5.0.', __CLASS__, \is_object($class) ? \get_class($class) : \gettype($class)), E_USER_DEPRECATED);
192+
@trigger_error(sprintf('The class name passed to %s is expected to be a string. Passing a %s is deprecated in Symfony 4.4 and will result in a TypeError in 5.0.', __CLASS__, \is_object($class) ? \get_class($class) : \gettype($class)), \E_USER_DEPRECATED);
193193
}
194194

195195
$this->changes['class'] = true;

Dumper/PhpDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,7 @@ private function isSingleUsePrivateNode(ServiceReferenceGraphNode $node): bool
20132013
*/
20142014
private function export($value)
20152015
{
2016-
if (null !== $this->targetDirRegex && \is_string($value) && preg_match($this->targetDirRegex, $value, $matches, PREG_OFFSET_CAPTURE)) {
2016+
if (null !== $this->targetDirRegex && \is_string($value) && preg_match($this->targetDirRegex, $value, $matches, \PREG_OFFSET_CAPTURE)) {
20172017
$suffix = $matches[0][1] + \strlen($matches[0][0]);
20182018
$matches[0][1] += \strlen($matches[1][0]);
20192019
$prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true).'.' : '';

0 commit comments

Comments
 (0)