Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commit518f565

Browse files
committed
Drop usage of TraceableEventDispatcherInterface in favor of concrete implementation
1 parent6b64072 commit518f565

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

‎src/Symfony/Component/HttpKernel/CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ CHANGELOG
44
4.0.0
55
-----
66

7-
* added orphaned events support to`EventDataCollector`
87
* removed the`DataCollector::varToString()` method, use`DataCollector::cloneVar()`
98
instead
109
* using the`DataCollector::cloneVar()` method requires the VarDumper component
@@ -29,6 +28,7 @@ CHANGELOG
2928
3.4.0
3029
-----
3130

31+
* added orphaned events support to`EventDataCollector`
3232
* added a minimalist PSR-3`Logger` class that writes in`stderr`
3333
* made kernels implementing`CompilerPassInterface` able to process the container
3434
* deprecated bundle inheritance

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespaceSymfony\Component\HttpKernel\DataCollector;
1313

14+
useSymfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
15+
useSymfony\Component\EventDispatcher\EventDispatcherInterface;
1416
useSymfony\Component\HttpFoundation\Request;
1517
useSymfony\Component\HttpFoundation\Response;
16-
useSymfony\Component\EventDispatcher\EventDispatcherInterface;
17-
useSymfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
1818

1919
/**
2020
* EventDataCollector.
@@ -53,7 +53,7 @@ public function reset()
5353

5454
publicfunctionlateCollect()
5555
{
56-
if ($this->dispatcherinstanceofTraceableEventDispatcherInterface) {
56+
if ($this->dispatcherinstanceofTraceableEventDispatcher) {
5757
$this->setCalledListeners($this->dispatcher->getCalledListeners());
5858
$this->setNotCalledListeners($this->dispatcher->getNotCalledListeners());
5959
$this->setOrphanedEvents($this->dispatcher->getOrphanedEvents());
@@ -66,67 +66,67 @@ public function lateCollect()
6666
*
6767
* @param array $listeners An array of called listeners
6868
*
69-
* @seeTraceableEventDispatcherInterface
69+
* @seeTraceableEventDispatcher
7070
*/
7171
publicfunctionsetCalledListeners(array$listeners)
7272
{
7373
$this->data['called_listeners'] =$listeners;
7474
}
7575

7676
/**
77-
*Gets the called listeners.
77+
*Sets the not called listeners.
7878
*
79-
* @return array An array of called listeners
79+
* @param array$listenersAn array of not called listeners
8080
*
81-
* @seeTraceableEventDispatcherInterface
81+
* @seeTraceableEventDispatcher
8282
*/
83-
publicfunctiongetCalledListeners()
83+
publicfunctionsetNotCalledListeners(array$listeners)
8484
{
85-
return$this->data['called_listeners'];
85+
$this->data['not_called_listeners'] =$listeners;
8686
}
8787

8888
/**
89-
* Sets thenot called listeners.
89+
* Sets theorphaned events.
9090
*
91-
* @param array $listeners An array ofnot called listeners
91+
* @param array $events An array oforphaned events
9292
*
93-
* @seeTraceableEventDispatcherInterface
93+
* @seeTraceableEventDispatcher
9494
*/
95-
publicfunctionsetNotCalledListeners(array$listeners)
95+
publicfunctionsetOrphanedEvents(array$events)
9696
{
97-
$this->data['not_called_listeners'] =$listeners;
97+
$this->data['orphaned_events'] =$events;
9898
}
9999

100100
/**
101-
* Gets thenotcalled listeners.
101+
* Gets the called listeners.
102102
*
103-
* @return array An array ofnotcalled listeners
103+
* @return array An array of called listeners
104104
*
105-
* @seeTraceableEventDispatcherInterface
105+
* @seeTraceableEventDispatcher
106106
*/
107-
publicfunctiongetNotCalledListeners()
107+
publicfunctiongetCalledListeners()
108108
{
109-
return$this->data['not_called_listeners'];
109+
return$this->data['called_listeners'];
110110
}
111111

112112
/**
113-
*Sets theorphaned events.
113+
*Gets thenot called listeners.
114114
*
115-
* @param array$eventsAn array oforphaned events
115+
* @return array An array ofnot called listeners
116116
*
117-
* @seeTraceableEventDispatcherInterface
117+
* @seeTraceableEventDispatcher
118118
*/
119-
publicfunctionsetOrphanedEvents(array$events)
119+
publicfunctiongetNotCalledListeners()
120120
{
121-
$this->data['orphaned_events'] =$events;
121+
return$this->data['not_called_listeners'];
122122
}
123123

124124
/**
125125
* Gets the orphaned events.
126126
*
127127
* @return array An array of orphaned events
128128
*
129-
* @seeTraceableEventDispatcherInterface
129+
* @seeTraceableEventDispatcher
130130
*/
131131
publicfunctiongetOrphanedEvents()
132132
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp