Skip to content

Commit 66b5482

Browse files
Merge branch '5.4' into 6.3
* 5.4: 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 b7a6388 + 6b76343 commit 66b5482

39 files changed

+58
-58
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
@@ -43,5 +43,5 @@ public function isFresh(): bool;
4343
*
4444
* @throws \RuntimeException When the cache file cannot be written
4545
*/
46-
public function write(string $content, array $metadata = null);
46+
public function write(string $content, ?array $metadata = null);
4747
}

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;
3838
protected $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

@@ -126,7 +126,7 @@ public function addDefaultsIfNotSet(): static
126126
*
127127
* @return $this
128128
*/
129-
public function addDefaultChildrenIfNoneSet(int|string|array $children = null): static
129+
public function addDefaultChildrenIfNoneSet(int|string|array|null $children = null): static
130130
{
131131
$this->addDefaultChildren = $children;
132132

@@ -169,7 +169,7 @@ public function disallowNewKeysInSubsequentConfigs(): static
169169
*
170170
* @return $this
171171
*/
172-
public function fixXmlConfig(string $singular, string $plural = null): static
172+
public function fixXmlConfig(string $singular, ?string $plural = null): static
173173
{
174174
$this->normalization()->remap($singular, $plural);
175175

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/NodeBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct()
3939
*
4040
* @return $this
4141
*/
42-
public function setParent(ParentNodeDefinitionInterface $parent = null): static
42+
public function setParent(?ParentNodeDefinitionInterface $parent = null): static
4343
{
4444
if (1 > \func_num_args()) {
4545
trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);

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 $parent;
3939
protected $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
@@ -36,7 +36,7 @@ public function __construct(NodeDefinition $node)
3636
*
3737
* @return $this
3838
*/
39-
public function remap(string $key, string $plural = null): static
39+
public function remap(string $key, ?string $plural = null): static
4040
{
4141
$this->remappings[] = [$key, null === $plural ? $key.'s' : $plural];
4242

@@ -48,7 +48,7 @@ public function remap(string $key, string $plural = null): static
4848
*
4949
* @return ExprBuilder|$this
5050
*/
51-
public function before(\Closure $closure = null): ExprBuilder|static
51+
public function before(?\Closure $closure = null): ExprBuilder|static
5252
{
5353
if (null !== $closure) {
5454
$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 $tree;
2424
protected $root;
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);

0 commit comments

Comments
 (0)