Extract the profiler to a new component #2
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is a replacement for symfony#10374
This pull request extracts the HTTP profiler from the HttpKernel component to a new dedicated component: Profiler.
The goals are to improve the general architecture and usability of the component as stated by @webmozart ( symfony#10374 (comment) )
as it stands now no BC is broken as the original DataCollectors are still supported by the new Profiler.
New DataCollectors and Profiler no longer require a Request and Response.
DataCollectors are should be able to collect data from other sources, which will prevent some ugly hacks that were previously required, they will still require to listen to events to collect the data, I don't see a way around this, but this doesn't seem a big issue.
If a DataCollector requires the Request, it should have the RequestStack and get it from there, the Responses can be added just like Controllers are added, by subscribing to the Kernel Events.
To debate:
Todo's: