Skip to content

Commit ffaa7b4

Browse files
Merge branch '6.0' into 6.1
* 6.0: CS fixes Bump Symfony version to 6.0.11 Update VERSION for 6.0.10 Update CHANGELOG for 6.0.10 Bump Symfony version to 5.4.11 Update VERSION for 5.4.10 Update CHANGELOG for 5.4.10 Bump Symfony version to 4.4.44 Update VERSION for 4.4.43 Update CONTRIBUTORS for 4.4.43 Update CHANGELOG for 4.4.43
2 parents 5635ff0 + 13748ef commit ffaa7b4

11 files changed

+17
-17
lines changed

Attribute/Autowire.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class Autowire
3333
* @param string|null $expression Expression (ie 'service("some.service").someMethod()')
3434
*/
3535
public function __construct(
36-
?string $value = null,
37-
?string $service = null,
38-
?string $expression = null,
36+
string $value = null,
37+
string $service = null,
38+
string $expression = null,
3939
) {
4040
if (!($service xor $expression xor null !== $value)) {
4141
throw new LogicException('#[Autowire] attribute must declare exactly one of $service, $expression, or $value.');

Compiler/AnalyzeServiceReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
114114
$value,
115115
$this->lazy || $targetDefinition?->isLazy(),
116116
true
117-
);
117+
);
118118
}
119119

120120
return $value;

Compiler/CheckDefinitionValidityPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function process(ContainerBuilder $container)
6363
foreach ($definition->getTags() as $name => $tags) {
6464
foreach ($tags as $attributes) {
6565
foreach ($attributes as $attribute => $value) {
66-
if (!is_scalar($value) && null !== $value) {
66+
if (!\is_scalar($value) && null !== $value) {
6767
throw new RuntimeException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute));
6868
}
6969
}

Dumper/PhpDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,13 @@ private function isTrivialInstance(Definition $definition): bool
708708
if ($v instanceof Reference && $this->container->has($id = (string) $v) && $this->container->findDefinition($id)->isSynthetic()) {
709709
continue;
710710
}
711-
if (!is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, false)) {
711+
if (!\is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, false)) {
712712
return false;
713713
}
714714
}
715715
} elseif ($arg instanceof Reference && $this->container->has($id = (string) $arg) && $this->container->findDefinition($id)->isSynthetic()) {
716716
continue;
717-
} elseif (!is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, false)) {
717+
} elseif (!\is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, false)) {
718718
return false;
719719
}
720720
}

EnvVarProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed
112112
}
113113

114114
if ('file' === $prefix || 'require' === $prefix) {
115-
if (!is_scalar($file = $getEnv($name))) {
115+
if (!\is_scalar($file = $getEnv($name))) {
116116
throw new RuntimeException(sprintf('Invalid file name: env var "%s" is non-scalar.', $name));
117117
}
118118
if (!is_file($file)) {
@@ -184,7 +184,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed
184184
return null;
185185
}
186186

187-
if (!is_scalar($env)) {
187+
if (!\is_scalar($env)) {
188188
throw new RuntimeException(sprintf('Non-scalar env var "%s" cannot be cast to "%s".', $name, $prefix));
189189
}
190190

@@ -283,7 +283,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed
283283
$value = $this->container->getParameter($match[1]);
284284
}
285285

286-
if (!is_scalar($value)) {
286+
if (!\is_scalar($value)) {
287287
throw new RuntimeException(sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, get_debug_type($value)));
288288
}
289289

Loader/Configurator/AbstractConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static function processValue(mixed $value, bool $allowServices = false):
9797

9898
switch (true) {
9999
case null === $value:
100-
case is_scalar($value):
100+
case \is_scalar($value):
101101
return $value;
102102

103103
case $value instanceof ArgumentInterface:

Loader/Configurator/DefaultsConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final public function tag(string $name, array $attributes = []): static
4949
}
5050

5151
foreach ($attributes as $attribute => $value) {
52-
if (null !== $value && !is_scalar($value)) {
52+
if (null !== $value && !\is_scalar($value)) {
5353
throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
5454
}
5555
}

Loader/Configurator/Traits/TagTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final public function tag(string $name, array $attributes = []): static
2727
}
2828

2929
foreach ($attributes as $attribute => $value) {
30-
if (!is_scalar($value) && null !== $value) {
30+
if (!\is_scalar($value) && null !== $value) {
3131
throw new InvalidArgumentException(sprintf('A tag attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $this->id, $name, $attribute));
3232
}
3333
}

Loader/YamlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ private function parseDefaults(array &$content, string $file): array
304304
}
305305

306306
foreach ($tag as $attribute => $value) {
307-
if (!is_scalar($value) && null !== $value) {
307+
if (!\is_scalar($value) && null !== $value) {
308308
throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in "%s". Check your YAML syntax.', $name, $attribute, $file));
309309
}
310310
}
@@ -612,7 +612,7 @@ private function parseDefinition(string $id, array|string|null $service, string
612612
}
613613

614614
foreach ($tag as $attribute => $value) {
615-
if (!is_scalar($value) && null !== $value) {
615+
if (!\is_scalar($value) && null !== $value) {
616616
throw new InvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in "%s". Check your YAML syntax.', $id, $name, $attribute, $file));
617617
}
618618
}

Tests/Compiler/RemoveUnusedDefinitionsPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function testProcessDoesNotErrorOnServicesThatDoNotHaveDefinitions()
133133
->addArgument(new Reference('not.defined'))
134134
->setPublic(true);
135135

136-
$container->set('not.defined', new \StdClass());
136+
$container->set('not.defined', new \stdClass());
137137

138138
$this->process($container);
139139

0 commit comments

Comments
 (0)