Skip to content
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

[WIP] Add resettable interface for Collectors #268

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

[WIP] Add resettable interface for Collectors #268

wants to merge 11 commits into from

Conversation

barryvdh
Copy link
Collaborator

This is aimed specifically for https://github.com/php-pm/php-pm but could be used for other concurrent request frameworks (which I don't know of).

Adds a reset() method to the collectors to reset the state. Eg. clear the messages, reset starting time etc.
Not all collectors have been done yet, not all need it.

This can be used like $debugbar->reset() to reset all collectors, the collected data and regenerate an request id.
For Laravel this can be called in the middleware, after handling the request. For PHP-PM, this avoids duplicate entries etc.

@barryvdh
Copy link
Collaborator Author

This might be still relevant for Octane etc. also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant