Skip to content

Commit 4f4a394

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Console] Restore psr/log >= 3.0 conflict [Security] Make the abstract Voter class implement CacheableVoterInterface Add generic types to traversable implementations [Security] Fix TypeError message [Security] Fix deprecation layer [FrameworkBundle] Add completion for workflow:dump Fix cancel button Fix misleading error on missing provider with authenticator manager Don't limit retries of toolbar loading
2 parents 3cbe9f1 + 823f9f4 commit 4f4a394

File tree

12 files changed

+52
-16
lines changed

12 files changed

+52
-16
lines changed

Button.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* A form button.
2121
*
2222
* @author Bernhard Schussek <[email protected]>
23+
*
24+
* @implements \IteratorAggregate<string, FormInterface>
2325
*/
2426
class Button implements \IteratorAggregate, FormInterface
2527
{
@@ -50,7 +52,7 @@ public function offsetExists(mixed $offset): bool
5052
*
5153
* @throws BadMethodCallException
5254
*/
53-
public function offsetGet(mixed $offset): mixed
55+
public function offsetGet(mixed $offset): FormInterface
5456
{
5557
throw new BadMethodCallException('Buttons cannot have children.');
5658
}

ButtonBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* A builder for {@link Button} instances.
2222
*
2323
* @author Bernhard Schussek <[email protected]>
24+
*
25+
* @implements \IteratorAggregate<string, FormBuilderInterface>
2426
*/
2527
class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
2628
{

ChoiceList/View/ChoiceGroupView.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Represents a group of choices in templates.
1616
*
1717
* @author Bernhard Schussek <[email protected]>
18+
*
19+
* @implements \IteratorAggregate<array-key, ChoiceGroupView|ChoiceView>
1820
*/
1921
class ChoiceGroupView implements \IteratorAggregate
2022
{
@@ -24,7 +26,7 @@ class ChoiceGroupView implements \IteratorAggregate
2426
/**
2527
* Creates a new choice group view.
2628
*
27-
* @param ChoiceGroupView[]|ChoiceView[] $choices the choice views in the group
29+
* @param array<array-key, ChoiceGroupView|ChoiceView> $choices the choice views in the group
2830
*/
2931
public function __construct(string $label, array $choices = [])
3032
{
@@ -35,7 +37,7 @@ public function __construct(string $label, array $choices = [])
3537
/**
3638
* {@inheritdoc}
3739
*
38-
* @return \Traversable<ChoiceGroupView|ChoiceView>
40+
* @return \Traversable<array-key, ChoiceGroupView|ChoiceView>
3941
*/
4042
public function getIterator(): \Traversable
4143
{

Extension/Validator/Constraints/FormValidator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
*/
2525
class FormValidator extends ConstraintValidator
2626
{
27+
/**
28+
* @var \SplObjectStorage<FormInterface, array<int, string|string[]|GroupSequence>>
29+
*/
2730
private \SplObjectStorage $resolvedGroups;
2831

2932
/**

Extension/Validator/ViolationMapper/ViolationPath.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
class ViolationPath implements \IteratorAggregate, PropertyPathInterface
2222
{
23+
/** @var string[] */
2324
private array $elements = [];
2425
private array $isIndex = [];
2526
private array $mapsForm = [];

Form.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
*
6767
* @author Fabien Potencier <[email protected]>
6868
* @author Bernhard Schussek <[email protected]>
69+
*
70+
* @implements \IteratorAggregate<string, FormInterface>
6971
*/
7072
class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterface
7173
{
@@ -75,7 +77,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
7577
/**
7678
* A map of FormInterface instances.
7779
*
78-
* @var FormInterface[]|OrderedHashMap
80+
* @var OrderedHashMap<string, FormInterface>
7981
*/
8082
private OrderedHashMap $children;
8183

FormBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* A builder for creating {@link Form} instances.
2222
*
2323
* @author Bernhard Schussek <[email protected]>
24+
*
25+
* @implements \IteratorAggregate<string, FormBuilderInterface>
2426
*/
2527
class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormBuilderInterface
2628
{

FormErrorIterator.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
* flatten the recursive structure into a flat list of errors.
2929
*
3030
* @author Bernhard Schussek <[email protected]>
31+
*
32+
* @implements \ArrayAccess<int, FormError|FormErrorIterator>
33+
* @implements \RecursiveIterator<int, FormError>
34+
* @implements \SeekableIterator<int, FormError>
3135
*/
3236
class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \ArrayAccess, \Countable
3337
{
@@ -40,8 +44,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
4044
private array $errors;
4145

4246
/**
43-
* @param FormError[]|self[] $errors An array of form errors and instances
44-
* of FormErrorIterator
47+
* @param array<int, FormError|self> $errors
4548
*
4649
* @throws InvalidArgumentException If the errors are invalid
4750
*/

FormInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
* A form group bundling multiple forms in a hierarchical structure.
1818
*
1919
* @author Bernhard Schussek <[email protected]>
20+
*
21+
* @extends \ArrayAccess<string, FormInterface>
22+
* @extends \Traversable<string, FormInterface>
2023
*/
2124
interface FormInterface extends \ArrayAccess, \Traversable, \Countable
2225
{

FormView.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
/**
1717
* @author Bernhard Schussek <[email protected]>
18+
*
19+
* @implements \ArrayAccess<string, FormView>
20+
* @implements \IteratorAggregate<string, FormView>
1821
*/
1922
class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
2023
{

0 commit comments

Comments
 (0)