Skip to content

Commit 7e18c9f

Browse files
Merge branch '2.8' into 3.4
* 2.8: Fix Clidumper tests Enable the fixer enforcing fully-qualified calls for compiler-optimized functions Apply fixers Disable the native_constant_invocation fixer until it can be scoped Update the list of excluded files for the CS fixer
2 parents 3f115cc + 105cd0f commit 7e18c9f

File tree

64 files changed

+261
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+261
-261
lines changed

Alias.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct($id, $public = true)
2525
{
2626
$this->id = (string) $id;
2727
$this->public = $public;
28-
$this->private = 2 > func_num_args();
28+
$this->private = 2 > \func_num_args();
2929
}
3030

3131
/**

Argument/IteratorArgument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function setValues(array $values)
4646
{
4747
foreach ($values as $k => $v) {
4848
if (null !== $v && !$v instanceof Reference) {
49-
throw new InvalidArgumentException(sprintf('An IteratorArgument must hold only Reference instances, "%s" given.', is_object($v) ? get_class($v) : gettype($v)));
49+
throw new InvalidArgumentException(sprintf('An IteratorArgument must hold only Reference instances, "%s" given.', \is_object($v) ? \get_class($v) : \gettype($v)));
5050
}
5151
}
5252

Argument/RewindableGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getIterator()
3838

3939
public function count()
4040
{
41-
if (is_callable($count = $this->count)) {
41+
if (\is_callable($count = $this->count)) {
4242
$this->count = $count();
4343
}
4444

ChildDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getArgument($index)
9595
*/
9696
public function replaceArgument($index, $value)
9797
{
98-
if (is_int($index)) {
98+
if (\is_int($index)) {
9999
$this->arguments['index_'.$index] = $value;
100100
} elseif (0 === strpos($index, '$')) {
101101
$this->arguments[$index] = $value;

Compiler/AbstractRecursivePass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ protected function processValue($value, $isRoot = false)
9090
*/
9191
protected function getConstructor(Definition $definition, $required)
9292
{
93-
if (is_string($factory = $definition->getFactory())) {
94-
if (!function_exists($factory)) {
93+
if (\is_string($factory = $definition->getFactory())) {
94+
if (!\function_exists($factory)) {
9595
throw new RuntimeException(sprintf('Invalid service "%s": function "%s" does not exist.', $this->currentId, $factory));
9696
}
9797
$r = new \ReflectionFunction($factory);

Compiler/AutowirePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ private function getAliasesSuggestionForType($type, $extraContext = null)
542542
}
543543

544544
$extraContext = $extraContext ? ' '.$extraContext : '';
545-
if (1 < $len = count($aliases)) {
545+
if (1 < $len = \count($aliases)) {
546546
$message = sprintf('Try changing the type-hint%s to one of its parents: ', $extraContext);
547547
for ($i = 0, --$len; $i < $len; ++$i) {
548548
$message .= sprintf('%s "%s", ', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]);

Compiler/CheckArgumentsValidityPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function processValue($value, $isRoot = false)
4141
$i = 0;
4242
foreach ($value->getArguments() as $k => $v) {
4343
if ($k !== $i++) {
44-
if (!is_int($k)) {
44+
if (!\is_int($k)) {
4545
$msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k);
4646
$value->addError($msg);
4747
if ($this->throwExceptions) {
@@ -63,7 +63,7 @@ protected function processValue($value, $isRoot = false)
6363
$i = 0;
6464
foreach ($methodCall[1] as $k => $v) {
6565
if ($k !== $i++) {
66-
if (!is_int($k)) {
66+
if (!\is_int($k)) {
6767
$msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k);
6868
$value->addError($msg);
6969
if ($this->throwExceptions) {

Compiler/CheckCircularReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private function checkOutEdges(array $edges)
6464
$this->currentPath[] = $id;
6565

6666
if (false !== $searchKey) {
67-
throw new ServiceCircularReferenceException($id, array_slice($this->currentPath, $searchKey));
67+
throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey));
6868
}
6969

7070
$this->checkOutEdges($node->getOutEdges());

Compiler/Compiler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ public function getLoggingFormatter()
7979
*/
8080
public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
8181
{
82-
if (func_num_args() >= 3) {
82+
if (\func_num_args() >= 3) {
8383
$priority = func_get_arg(2);
8484
} else {
85-
if (__CLASS__ !== get_class($this)) {
85+
if (__CLASS__ !== \get_class($this)) {
8686
$r = new \ReflectionMethod($this, __FUNCTION__);
8787
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
8888
@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);
@@ -115,10 +115,10 @@ public function addLogMessage($string)
115115
public function log(CompilerPassInterface $pass, $message)
116116
{
117117
if (false !== strpos($message, "\n")) {
118-
$message = str_replace("\n", "\n".get_class($pass).': ', trim($message));
118+
$message = str_replace("\n", "\n".\get_class($pass).': ', trim($message));
119119
}
120120

121-
$this->log[] = get_class($pass).': '.$message;
121+
$this->log[] = \get_class($pass).': '.$message;
122122
}
123123

124124
/**

Compiler/FactoryReturnTypePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function updateDefinition(ContainerBuilder $container, $id, Definition $
6161
}
6262

6363
$class = null;
64-
if (is_string($factory)) {
64+
if (\is_string($factory)) {
6565
try {
6666
$m = new \ReflectionFunction($factory);
6767
if (false !== $m->getFileName() && file_exists($m->getFileName())) {

0 commit comments

Comments
 (0)