If the PDOTraceableDataCollector is enabled and no database calls
happen to be made in a request, PHP 8.1 emits a fatal error, e.g.,
```
<b>Fatal error</b>: Uncaught TypeError:
DebugBar\DataCollector\PDO\TraceablePDO::getAccumulatedStatementsDuration():
Return value must be of type float, null returned in
vendor/maximebf/debugbar/src/DebugBar/DataCollector/PDO/TraceablePDO.php:251
```
The same error occurs in getMemoryUsage() and getPeakMemoryUsage().
Adding an initial value of 0 to `array_reduce()` corrects the problem.
Corrects bug #522.
* fix: Fix FileStorage::find function
Fix FileStorage::find function usort callback function to return int instead of bool, because after PHP8 bool return value for the callback function is not supported.
* fix: Fix FileStorage::find function
Fix FileStorage::find function usort callback function to return int instead of bool, because after PHP8 bool return value for the callback function is not supported.
* PHP 8.1 warning fixes
Added #[\ReturnTypeWillChange] or appropriate return values
Typed parameters where appropriate
* Fixing unit tests to run without warnings
* Update to more reasonable versions of PHP and PHPUnit (was missing PHPUnit 8)
* mb_check_encoding param 1 can not be null
* Fix SeekingData class for 8.1
* Update tests to not polute the temp directory
* Revert PHP contrant
* Tabs to spaces
* Use Symfony\Component\VarDumper\Cloner\Data\SeekingData instead of local backported version
Avoids Fatal error: Declaration of DebugBar\DataFormatter\VarDumper\SeekingData::seek($key) must be compatible with Symfony\Component\VarDumper\Cloner\Data::seek(string|int $key): ?static
Co-authored-by: Barry vd. Heuvel <barryvdh@gmail.com>
This fixes a PHP 8.1 bug "Deprecated: Implicit conversion from float -INF to int loses precision in vendor/maximebf/debugbar/src/DebugBar/DataFormatter/DataFormatter.php
* Add #[ReturnTypeWillChange] attribute to suppress deprecation warnings and fatal error
Error occurs on php 7.4 >=
* Same in other 4 methods #[\ReturnTypeWillChange]
Add #[\ReturnTypeWillChange] in other 4 methods to avoid E_DEPRECATED or E_FATAL (php 7.4 >=)
* Support psr/log:^2.0,^3.0
* Update FileStorageTest.php
Co-authored-by: Erik Niebla <ep_niebla@hotmail.com>
Co-authored-by: Barry vd. Heuvel <barryvdh@gmail.com>
* RedisStorage: Introduced support of php-redis module. Fixed clear() method
* Fixed sorting order for RedisStorage to show newest requests on top
* Revert BC breaking changes