Skip to content

Commit 76bfa17

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 02b2a2a + dabf7e9 commit 76bfa17

File tree

77 files changed

+97
-97
lines changed

Some content is hidden

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

77 files changed

+97
-97
lines changed

Button.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getParent(): ?FormInterface
104104
*
105105
* @throws BadMethodCallException
106106
*/
107-
public function add(string|FormInterface $child, string $type = null, array $options = []): static
107+
public function add(string|FormInterface $child, ?string $type = null, array $options = []): static
108108
{
109109
throw new BadMethodCallException('Buttons cannot have children.');
110110
}
@@ -335,7 +335,7 @@ public function isRoot(): bool
335335
return null === $this->parent;
336336
}
337337

338-
public function createView(FormView $parent = null): FormView
338+
public function createView(?FormView $parent = null): FormView
339339
{
340340
if (null === $parent && $this->parent) {
341341
$parent = $this->parent->createView();

ButtonBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(?string $name, array $options = [])
5353
*
5454
* @throws BadMethodCallException
5555
*/
56-
public function add(string|FormBuilderInterface $child, string $type = null, array $options = []): never
56+
public function add(string|FormBuilderInterface $child, ?string $type = null, array $options = []): never
5757
{
5858
throw new BadMethodCallException('Buttons cannot have children.');
5959
}
@@ -63,7 +63,7 @@ public function add(string|FormBuilderInterface $child, string $type = null, arr
6363
*
6464
* @throws BadMethodCallException
6565
*/
66-
public function create(string $name, string $type = null, array $options = []): never
66+
public function create(string $name, ?string $type = null, array $options = []): never
6767
{
6868
throw new BadMethodCallException('Buttons cannot have children.');
6969
}

ChoiceList/ArrayChoiceList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ArrayChoiceList implements ChoiceListInterface
4848
* incrementing integers are used as
4949
* values
5050
*/
51-
public function __construct(iterable $choices, callable $value = null)
51+
public function __construct(iterable $choices, ?callable $value = null)
5252
{
5353
if ($choices instanceof \Traversable) {
5454
$choices = iterator_to_array($choices);

ChoiceList/Factory/Cache/ChoiceLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
*/
2727
final class ChoiceLoader extends AbstractStaticOption implements ChoiceLoaderInterface
2828
{
29-
public function loadChoiceList(callable $value = null): ChoiceListInterface
29+
public function loadChoiceList(?callable $value = null): ChoiceListInterface
3030
{
3131
return $this->getOption()->loadChoiceList($value);
3232
}
3333

34-
public function loadChoicesForValues(array $values, callable $value = null): array
34+
public function loadChoicesForValues(array $values, ?callable $value = null): array
3535
{
3636
return $this->getOption()->loadChoicesForValues($values, $value);
3737
}
3838

39-
public function loadValuesForChoices(array $choices, callable $value = null): array
39+
public function loadValuesForChoices(array $choices, ?callable $value = null): array
4040
{
4141
return $this->getOption()->loadValuesForChoices($choices, $value);
4242
}

ChoiceList/Factory/ChoiceListFactoryInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface ChoiceListFactoryInterface
3333
*
3434
* @param callable|null $filter The callable filtering the choices
3535
*/
36-
public function createListFromChoices(iterable $choices, callable $value = null, callable $filter = null): ChoiceListInterface;
36+
public function createListFromChoices(iterable $choices, ?callable $value = null, ?callable $filter = null): ChoiceListInterface;
3737

3838
/**
3939
* Creates a choice list that is loaded with the given loader.
@@ -44,7 +44,7 @@ public function createListFromChoices(iterable $choices, callable $value = null,
4444
*
4545
* @param callable|null $filter The callable filtering the choices
4646
*/
47-
public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null, callable $filter = null): ChoiceListInterface;
47+
public function createListFromLoader(ChoiceLoaderInterface $loader, ?callable $value = null, ?callable $filter = null): ChoiceListInterface;
4848

4949
/**
5050
* Creates a view for the given choice list.
@@ -81,5 +81,5 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $va
8181
* on top of the list and in their original position
8282
* or only in the top of the list
8383
*/
84-
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView;
84+
public function createView(ChoiceListInterface $list, array|callable|null $preferredChoices = null, callable|false|null $label = null, ?callable $index = null, ?callable $groupBy = null, array|callable|null $attr = null, array|callable $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView;
8585
}

ChoiceList/Factory/DefaultChoiceListFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
class DefaultChoiceListFactory implements ChoiceListFactoryInterface
3232
{
33-
public function createListFromChoices(iterable $choices, callable $value = null, callable $filter = null): ChoiceListInterface
33+
public function createListFromChoices(iterable $choices, ?callable $value = null, ?callable $filter = null): ChoiceListInterface
3434
{
3535
if ($filter) {
3636
// filter the choice list lazily
@@ -43,7 +43,7 @@ public function createListFromChoices(iterable $choices, callable $value = null,
4343
return new ArrayChoiceList($choices, $value);
4444
}
4545

46-
public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null, callable $filter = null): ChoiceListInterface
46+
public function createListFromLoader(ChoiceLoaderInterface $loader, ?callable $value = null, ?callable $filter = null): ChoiceListInterface
4747
{
4848
if ($filter) {
4949
$loader = new FilterChoiceLoaderDecorator($loader, $filter);
@@ -52,7 +52,7 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $va
5252
return new LazyChoiceList($loader, $value);
5353
}
5454

55-
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView
55+
public function createView(ChoiceListInterface $list, array|callable|null $preferredChoices = null, callable|false|null $label = null, ?callable $index = null, ?callable $groupBy = null, array|callable|null $attr = null, array|callable $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView
5656
{
5757
$preferredViews = [];
5858
$preferredViewsOrder = [];

ChoiceList/Factory/PropertyAccessDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PropertyAccessDecorator implements ChoiceListFactoryInterface
4141
private ChoiceListFactoryInterface $decoratedFactory;
4242
private PropertyAccessorInterface $propertyAccessor;
4343

44-
public function __construct(ChoiceListFactoryInterface $decoratedFactory, PropertyAccessorInterface $propertyAccessor = null)
44+
public function __construct(ChoiceListFactoryInterface $decoratedFactory, ?PropertyAccessorInterface $propertyAccessor = null)
4545
{
4646
$this->decoratedFactory = $decoratedFactory;
4747
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();

ChoiceList/LazyChoiceList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class LazyChoiceList implements ChoiceListInterface
4545
*
4646
* @param callable|null $value The callable generating the choice values
4747
*/
48-
public function __construct(ChoiceLoaderInterface $loader, callable $value = null)
48+
public function __construct(ChoiceLoaderInterface $loader, ?callable $value = null)
4949
{
5050
$this->loader = $loader;
5151
$this->value = null === $value ? null : $value(...);

ChoiceList/Loader/AbstractChoiceLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ abstract class AbstractChoiceLoader implements ChoiceLoaderInterface
2424
/**
2525
* @final
2626
*/
27-
public function loadChoiceList(callable $value = null): ChoiceListInterface
27+
public function loadChoiceList(?callable $value = null): ChoiceListInterface
2828
{
2929
return new ArrayChoiceList($this->choices ??= $this->loadChoices(), $value);
3030
}
3131

32-
public function loadChoicesForValues(array $values, callable $value = null): array
32+
public function loadChoicesForValues(array $values, ?callable $value = null): array
3333
{
3434
if (!$values) {
3535
return [];
@@ -38,7 +38,7 @@ public function loadChoicesForValues(array $values, callable $value = null): arr
3838
return $this->doLoadChoicesForValues($values, $value);
3939
}
4040

41-
public function loadValuesForChoices(array $choices, callable $value = null): array
41+
public function loadValuesForChoices(array $choices, ?callable $value = null): array
4242
{
4343
if (!$choices) {
4444
return [];

ChoiceList/Loader/ChoiceLoaderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface ChoiceLoaderInterface
3434
* @param callable|null $value The callable which generates the values
3535
* from choices
3636
*/
37-
public function loadChoiceList(callable $value = null): ChoiceListInterface;
37+
public function loadChoiceList(?callable $value = null): ChoiceListInterface;
3838

3939
/**
4040
* Loads the choices corresponding to the given values.
@@ -50,7 +50,7 @@ public function loadChoiceList(callable $value = null): ChoiceListInterface;
5050
* values in this array are ignored
5151
* @param callable|null $value The callable generating the choice values
5252
*/
53-
public function loadChoicesForValues(array $values, callable $value = null): array;
53+
public function loadChoicesForValues(array $values, ?callable $value = null): array;
5454

5555
/**
5656
* Loads the values corresponding to the given choices.
@@ -68,5 +68,5 @@ public function loadChoicesForValues(array $values, callable $value = null): arr
6868
*
6969
* @return string[]
7070
*/
71-
public function loadValuesForChoices(array $choices, callable $value = null): array;
71+
public function loadValuesForChoices(array $choices, ?callable $value = null): array;
7272
}

0 commit comments

Comments
 (0)