Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit acbb8ed

Browse filesBrowse files
committed
bug #43380 [HttpKernel] Fix return types in EventDataCollector (chalasr)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpKernel] Fix return types in `EventDataCollector` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - DataCollectors' getters return `array|Data` when `lateCollect()` transforms the collected data using VarDumper. Before: <img width="1102" alt="Screenshot 2021-10-09 at 17 56 36" src="https://user-images.githubusercontent.com/7502063/136665739-c3cd2c9f-e6c3-4441-bb27-a3d8480a1b11.png"> After: <img width="957" alt="Screenshot 2021-10-09 at 17 57 03" src="https://user-images.githubusercontent.com/7502063/136665743-99056576-ead3-4b0d-a58b-03b5cb594aa7.png"> Commits ------- 7690c3b [HttpKernel] Fix return types in `EventDataCollector`
2 parents 626d9aa + 7690c3b commit acbb8ed
Copy full SHA for acbb8ed

File tree

1 file changed

+10
-3
lines changed
Filter options

1 file changed

+10
-3
lines changed

‎src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\HttpFoundation\Request;
1616
use Symfony\Component\HttpFoundation\RequestStack;
1717
use Symfony\Component\HttpFoundation\Response;
18+
use Symfony\Component\VarDumper\Cloner\Data;
1819
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
1920
use Symfony\Contracts\Service\ResetInterface;
2021

@@ -80,8 +81,10 @@ public function setCalledListeners(array $listeners)
8081

8182
/**
8283
* @see TraceableEventDispatcher
84+
*
85+
* @return array|Data
8386
*/
84-
public function getCalledListeners(): array
87+
public function getCalledListeners()
8588
{
8689
return $this->data['called_listeners'];
8790
}
@@ -96,8 +99,10 @@ public function setNotCalledListeners(array $listeners)
9699

97100
/**
98101
* @see TraceableEventDispatcher
102+
*
103+
* @return array|Data
99104
*/
100-
public function getNotCalledListeners(): array
105+
public function getNotCalledListeners()
101106
{
102107
return $this->data['not_called_listeners'];
103108
}
@@ -114,8 +119,10 @@ public function setOrphanedEvents(array $events)
114119

115120
/**
116121
* @see TraceableEventDispatcher
122+
*
123+
* @return array|Data
117124
*/
118-
public function getOrphanedEvents(): array
125+
public function getOrphanedEvents()
119126
{
120127
return $this->data['orphaned_events'];
121128
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.