-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere #9168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
#9169 must be merged first to fix the tests. |
#9169 has been merged now. |
This causes everything to blow up for me and I get a weird error like before
|
@Drak What you mean by "like before"? "TraceableEventDispatcher.php line 366" -> is it the |
@fabpot the logger, database (this one is extended in DoctrineBundle so we need to check how it would work) and swiftmailer (in the bundle) collectors should also implement this interface IMO, otherwise they are missing the data for logic happening in the terminate event |
As the replacement of the default event dispatcher by the traceable one still causes problems on some apps (like Zikula), I've opened a new PR with just the refactoring part as it brings value by itself and is totally independent (see #9170). |
…bpot) This PR was merged into the master branch. Discussion ---------- Decoupled TraceableEventDispatcher from the Profiler | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a This PR removes the Profiler dependency on the TraceableEventDispatcher. That makes things more decoupled and cleaner. This PR also cleans up how profiles are stored; a Profile is now always stored only once. I've created a `LateDataCollectorInterface` that is implemented for data collector that needs to get information from data that are available very late in the request process (when the request and the response are not even available anymore). The `lateCollect()` method is called just before the profile is stored. We have 3 data collectors that implement that interface: * Time: As the traceable event dipsatcher gets inject timing information via the stopwatch about all events (including the `terminate` one), we need to get events from the stopwatch as late as possible. * Event: The traceable event dispatcher gathers all called listeners to determine non-called ones. To be able to accurately do that for all events (including the `terminate` one), we need to get the data as late as possible. * Memory: We want to get the memory as late as possible to get the most accurate number as possible I'm not very happy with the name and as always, better suggestions would be much appreciated. This is an extract from #9168 Commits ------- 5cedea2 [HttpKernel] added LateDataCollectorInterface 9c4bc9a [HttpKernel] decoupled TraceableEventDispatcher and Profiler
… is used everywhere (fabpot) This PR was merged into the master branch. Discussion ---------- [FrameworkBundle] made sure that the debug event dispatcher is used everywhere | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #6686, #7673 | License | MIT | Doc PR | n/a The removal of the Profiler dependency on the TraceableEventDispatcher (#9170) allows to remerge the patch from #9068 that fixes #6686. This PR also cleans up how profiles are stored. A Profile is now always stored only once. The fix will only be available on 2.4+ as the changes are too deep to be backported to 2.2 and 2.3. Commits ------- 1e1835e [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
The removal of the Profiler dependency on the TraceableEventDispatcher (#9170) allows to remerge the patch from #9068 that fixes #6686.
This PR also cleans up how profiles are stored. A Profile is now always stored only once.
The fix will only be available on 2.4+ as the changes are too deep to be backported to 2.2 and 2.3.