Skip to content

Commit 1e862f4

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: (27 commits) feat: add completion for DebugAutowiring search argument [Routing] Add support for aliasing routes [DependencyInjection] only allow `ReflectionNamedType` for `ServiceSubscriberTrait` Fix CS [Console] Open CompleteCommand for custom outputs [Intl] Update the ICU data to 70.1 [Messenger] Add completion for failed messages commands. Fix tests Fixing missing full_stack variable that's needed by toolbar.html.twig [PropertyInfo] Bump phpstan/phpdoc-parser [Security] Backport type fixes [VarExporter] escape unicode chars involved in directionality [Framework] Add completion to debug:container [Messenger] Add completion to command messenger:consume [Intl] Update the ICU data to 70.1 Fix more generic types Default access_decision_manager.strategy option with merge. Fix typos Update validators.ca.xlf Add missing Validator translations for Estonian ... Signed-off-by: Alexander M. Turek <[email protected]>
2 parents 4f4a394 + 5640f86 commit 1e862f4

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

Extension/Validator/ViolationMapper/ViolationMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function mapViolation(ConstraintViolation $violation, FormInterface $form
5757
$match = false;
5858

5959
// Don't create a ViolationPath instance for empty property paths
60-
if (\strlen($violation->getPropertyPath()) > 0) {
60+
if ('' !== $violation->getPropertyPath()) {
6161
$violationPath = new ViolationPath($violation->getPropertyPath());
6262
$relativePath = $this->reconstructPath($violationPath, $form);
6363
}

Extension/Validator/ViolationMapper/ViolationPath.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717

1818
/**
1919
* @author Bernhard Schussek <[email protected]>
20+
*
21+
* @implements \IteratorAggregate<int, string>
2022
*/
2123
class ViolationPath implements \IteratorAggregate, PropertyPathInterface
2224
{
23-
/** @var string[] */
25+
/** @var list<string> */
2426
private array $elements = [];
2527
private array $isIndex = [];
2628
private array $mapsForm = [];

FormBuilderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Bernhard Schussek <[email protected]>
1616
*
17-
* @extends \Traversable<string, self>
17+
* @extends \Traversable<string, FormBuilderInterface>
1818
*/
1919
interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuilderInterface
2020
{

FormErrorIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
4444
private array $errors;
4545

4646
/**
47-
* @param array<int, FormError|self> $errors
47+
* @param list<FormError|self> $errors
4848
*
4949
* @throws InvalidArgumentException If the errors are invalid
5050
*/

Util/OrderedHashMap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,15 @@ class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable
8181

8282
/**
8383
* The keys of the map in the order in which they were inserted or changed.
84+
*
85+
* @var list<TKey>
8486
*/
8587
private array $orderedKeys = [];
8688

8789
/**
8890
* References to the cursors of all open iterators.
91+
*
92+
* @var array<int, int>
8993
*/
9094
private array $managedCursors = [];
9195

Util/OrderedHashMapIterator.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,32 @@
1818
*
1919
* @internal
2020
*
21-
* @template TKey
22-
* @template TValue
21+
* @template-covariant TKey of array-key
22+
* @template-covariant TValue
2323
*
2424
* @implements \Iterator<TKey, TValue>
2525
*/
2626
class OrderedHashMapIterator implements \Iterator
2727
{
28+
/** @var array<TKey, TValue> */
2829
private array $elements;
30+
/** @var list<TKey> */
2931
private array $orderedKeys;
3032
private int $cursor = 0;
3133
private int $cursorId;
34+
/** @var array<int, int> */
3235
private array $managedCursors;
36+
/** @var TKey|null */
3337
private string|int|null $key = null;
38+
/** @var TValue|null */
3439
private mixed $current = null;
3540

3641
/**
3742
* @param array<TKey, TValue> $elements The elements of the map, indexed by their
3843
* keys
39-
* @param array $orderedKeys The keys of the map in the order in which
44+
* @param list<TKey> $orderedKeys The keys of the map in the order in which
4045
* they should be iterated
41-
* @param array $managedCursors An array from which to reference the
46+
* @param array<int, int> $managedCursors An array from which to reference the
4247
* iterator's cursor as long as it is alive.
4348
* This array is managed by the corresponding
4449
* {@link OrderedHashMap} instance to support

0 commit comments

Comments
 (0)