php-debugbar icon indicating copy to clipboard operation
php-debugbar copied to clipboard

[WIP] Add resettable interface for Collectors

Open barryvdh opened this issue 9 years ago • 1 comments

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 avatar Apr 16 '16 20:04 barryvdh

This might be still relevant for Octane etc. also

barryvdh avatar Mar 21 '24 08:03 barryvdh