| Q | A
| --------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Related tickets | fixes #121
| Documentation | n/a
| License | MIT
fix #121.
The issue occurs when a plugin like redirect is triggered, it's code create a new request and then calls $first($newRequest)
. By doing so, the data collector is completely messed up and show the new request in the stack which created the request and in a new request stack.
We have to find a way to not mess the display. My proposal is to inject in the debug stack a plugin that when called with a RequestInterface
mark the beginning of a new request and when called with a ResponseInterface
mark the end of the current request.
If called with a RequestInterface
twice without intermediary call with ResponseInterface
, we could mark the beginning of a new request and also mark this new request as coming from the first one.
Current panel rendering (1.8MB png)
HttplugBundle configuration:
httplug:
clients:
centrale:
config:
timeout: 2
factory: httplug.factory.guzzle6
plugins:
- App\Http\Plugin\AuthorizationPlugin
- add_host:
host: 'localhost'
- header_set:
headers:
Accept: application/json
- httplug.plugin.error
- httplug.plugin.logger
- httplug.plugin.redirect
plugins:
logger:
logger: monolog.logger.httplug
The triggered request was GET /api/user
which redirects to /api/entities/1e24fb4a-e250-11e6-b52d-0242ac140002
To Do
- [x] Write a fix!
- [x] Write some internal documentation about profiling?
- [x] Mark profiler classes as
@internal
.
- [x] Fix existing unit tests.
- [x] Write new unit tests.
- [x] 2.7 compatibility.
- [x] Update CHANGELOG.md.