Skip to content

Commit 95834ca

Browse files
Merge branch '6.4' into 7.0
* 6.4: Fix implicitly-required parameters minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents 8789646 + e572736 commit 95834ca

38 files changed

+57
-57
lines changed

Builder/ClassBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function addMethod(string $name, string $body, array $params = []): void
119119
$this->methods[] = new Method(strtr($body, ['NAME' => $this->camelCase($name)] + $params));
120120
}
121121

122-
public function addProperty(string $name, string $classType = null, string $defaultValue = null): Property
122+
public function addProperty(string $name, ?string $classType = null, ?string $defaultValue = null): Property
123123
{
124124
$property = new Property($name, '_' !== $name[0] ? $this->camelCase($name) : $name);
125125
if (null !== $classType) {

ConfigCacheInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ public function isFresh(): bool;
4141
*
4242
* @throws \RuntimeException When the cache file cannot be written
4343
*/
44-
public function write(string $content, array $metadata = null): void;
44+
public function write(string $content, ?array $metadata = null): void;
4545
}

Definition/BaseNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class BaseNode implements NodeInterface
4646
/**
4747
* @throws \InvalidArgumentException if the name contains a period
4848
*/
49-
public function __construct(?string $name, NodeInterface $parent = null, string $pathSeparator = self::DEFAULT_PATH_SEPARATOR)
49+
public function __construct(?string $name, ?NodeInterface $parent = null, string $pathSeparator = self::DEFAULT_PATH_SEPARATOR)
5050
{
5151
if (str_contains($name = (string) $name, $pathSeparator)) {
5252
throw new \InvalidArgumentException('The name must not contain ".'.$pathSeparator.'".');

Definition/Builder/ArrayNodeDefinition.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
3737
protected NodeBuilder $nodeBuilder;
3838
protected bool $normalizeKeys = true;
3939

40-
public function __construct(?string $name, NodeParentInterface $parent = null)
40+
public function __construct(?string $name, ?NodeParentInterface $parent = null)
4141
{
4242
parent::__construct($name, $parent);
4343

@@ -123,7 +123,7 @@ public function addDefaultsIfNotSet(): static
123123
*
124124
* @return $this
125125
*/
126-
public function addDefaultChildrenIfNoneSet(int|string|array $children = null): static
126+
public function addDefaultChildrenIfNoneSet(int|string|array|null $children = null): static
127127
{
128128
$this->addDefaultChildren = $children;
129129

@@ -166,7 +166,7 @@ public function disallowNewKeysInSubsequentConfigs(): static
166166
*
167167
* @return $this
168168
*/
169-
public function fixXmlConfig(string $singular, string $plural = null): static
169+
public function fixXmlConfig(string $singular, ?string $plural = null): static
170170
{
171171
$this->normalization()->remap($singular, $plural);
172172

Definition/Builder/BooleanNodeDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class BooleanNodeDefinition extends ScalarNodeDefinition
2323
{
24-
public function __construct(?string $name, NodeParentInterface $parent = null)
24+
public function __construct(?string $name, ?NodeParentInterface $parent = null)
2525
{
2626
parent::__construct($name, $parent);
2727

Definition/Builder/ExprBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(NodeDefinition $node)
4242
*
4343
* @return $this
4444
*/
45-
public function always(\Closure $then = null): static
45+
public function always(?\Closure $then = null): static
4646
{
4747
$this->ifPart = static fn () => true;
4848
$this->allowedTypes = self::TYPE_ANY;
@@ -61,7 +61,7 @@ public function always(\Closure $then = null): static
6161
*
6262
* @return $this
6363
*/
64-
public function ifTrue(\Closure $closure = null): static
64+
public function ifTrue(?\Closure $closure = null): static
6565
{
6666
$this->ifPart = $closure ?? static fn ($v) => true === $v;
6767
$this->allowedTypes = self::TYPE_ANY;

Definition/Builder/NodeDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class NodeDefinition implements NodeParentInterface
3838
protected NodeParentInterface|NodeInterface|null $parent;
3939
protected array $attributes = [];
4040

41-
public function __construct(?string $name, NodeParentInterface $parent = null)
41+
public function __construct(?string $name, ?NodeParentInterface $parent = null)
4242
{
4343
$this->parent = $parent;
4444
$this->name = $name;

Definition/Builder/NormalizationBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(NodeDefinition $node)
3737
*
3838
* @return $this
3939
*/
40-
public function remap(string $key, string $plural = null): static
40+
public function remap(string $key, ?string $plural = null): static
4141
{
4242
$this->remappings[] = [$key, null === $plural ? $key.'s' : $plural];
4343

@@ -49,7 +49,7 @@ public function remap(string $key, string $plural = null): static
4949
*
5050
* @return ExprBuilder|$this
5151
*/
52-
public function before(\Closure $closure = null): ExprBuilder|static
52+
public function before(?\Closure $closure = null): ExprBuilder|static
5353
{
5454
if (null !== $closure) {
5555
$this->before[] = $closure;

Definition/Builder/TreeBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TreeBuilder implements NodeParentInterface
2323
protected ?NodeInterface $tree = null;
2424
protected ?NodeDefinition $root = null;
2525

26-
public function __construct(string $name, string $type = 'array', NodeBuilder $builder = null)
26+
public function __construct(string $name, string $type = 'array', ?NodeBuilder $builder = null)
2727
{
2828
$builder ??= new NodeBuilder();
2929
$this->root = $builder->node($name, $type)->setParent($this);

Definition/Builder/ValidationBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(NodeDefinition $node)
3232
*
3333
* @return ExprBuilder|$this
3434
*/
35-
public function rule(\Closure $closure = null): ExprBuilder|static
35+
public function rule(?\Closure $closure = null): ExprBuilder|static
3636
{
3737
if (null !== $closure) {
3838
$this->rules[] = $closure;

0 commit comments

Comments
 (0)