Because there are many breaking changes an upgrade is not that easy. There are many edge cases this guide does not cover. We accept PRs to improve this guide.
Version two of the package has been a complete rewrite, we've added some interesting points in this upgrade guide but advise you to read the docs again.
- The package requires now PHP 8.2 or higher.
- The
anonymizeIp()method was renamed tocensorClientIps()and should now be called on Flare config object - The
censorRequestBodyFields()method was renamed tocensorBodyFields()and should now be called on Flare config object - The
reportErrorLevelsmethod should now be called on Flare config object - The
overrideGroupingmethod should now be called on Flare config object - The
$flare->context()method works a bit different now, the concept of groups has been removed. A single context item still can be added like this:
$flare->context('key', 'value'); // Single itemMultiple context items can be added like this:
$flare->context([
'key' => 'value',
'key2' => 'value2',
]);- The
groupmethod to add context data has been removed, you should just use thecontext()method - We've changed how glows are added (MessageLevels is now an enum and slightly renamed):
$flare->glow('This is a message from glow!', MessageLevels::DEBUG); // Old way
$flare->glow()->record('This is a message from glow!', MessageLevels::Debug); // New way- The
argumentReducers()method has been removed, you should use thecollectStackFrameArgumentsmethod on the Flare config object - It is still possible to add custom middleware. We did remove the possibility to add middleware inline with a closure and adding a middleware class must now be done like this on the Flare config object:
$config->collectFlareMiddleware([
MyMiddleware::class => [],
]);- All the recorders and middleware provided by the package are rewritten or removed, if you extended any of these please check them.