Skip to content

Commit

Permalink
bug symfony#44745 [EventDispatcher][HttpFoundation] Restore return ty…
Browse files Browse the repository at this point in the history
…pe to covariant IteratorAggregate implementations (derrabus)

This PR was merged into the 6.0 branch.

Discussion
----------

[EventDispatcher][HttpFoundation] Restore return type to covariant IteratorAggregate implementations

| Q             | A
| ------------- | ---
| Branch?       | 6.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Follows symfony#44731
| License       | MIT
| Doc PR        | N/A

Commits
-------

0f2b5bb Restore return type to covariant IteratorAggregate implementations
  • Loading branch information
fabpot committed Dec 21, 2021
2 parents 57d644d + 0f2b5bb commit 33399e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symfony/Component/EventDispatcher/GenericEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ public function offsetExists(mixed $key): bool

/**
* IteratorAggregate for iterating over the object like an array.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/HeaderBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ public function removeCacheControlDirective(string $key)

/**
* Returns an iterator for headers.
*
* @return \ArrayIterator<string, list<string|null>>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/ParameterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ public function filter(string $key, mixed $default = null, int $filter = \FILTER

/**
* Returns an iterator for parameters.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ public function clear(): mixed

/**
* Returns an iterator for attributes.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ public function isStarted(): bool

/**
* Returns an iterator for attributes.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down

0 comments on commit 33399e6

Please sign in to comment.