PhpMetrics
PhpMetrics copied to clipboard
PHP8 Issue on report-violations
Bug report
-
phpmetrics v3.0.0rc3.
-
PHP 8.2.7
Hi,
When i run --report-violations
with PHP 8.2.7, I get Uncaught TypeError
.
Here is the full exception I have :
HTML report generated in "/ExtractColloque/" directoryPHP Fatal error: Uncaught TypeError: array_map():
Argument #2 ($array) must be of type array, Hal\Violation\ViolationsHandler given in
/vendor/phpmetrics/phpmetrics/src/Hal/Report/Violations/Xml/Reporter.php:64
Stack trace:
#0 /vendor/phpmetrics/phpmetrics/src/Hal/Report/Violations/Xml/Reporter.php(64): array_map()
#1 /vendor/phpmetrics/phpmetrics/src/Hal/Application/ReporterHandler.php(32): Hal\Report\Violations\Xml\Reporter->generate()
#2 [internal function]: Hal\Application\ReporterHandler::Hal\Application\{closure}()
#3 /vendor/phpmetrics/phpmetrics/src/Hal/Application/ReporterHandler.php(31): array_map()
#4 /vendor/phpmetrics/phpmetrics/src/Hal/Application/PhpMetrics.php(33): Hal\Application\ReporterHandler->report()
#5 /vendor/phpmetrics/phpmetrics/bin/phpmetrics(36): Hal\Application\PhpMetrics->run()
#6 {main}
thrown in /vendor/phpmetrics/phpmetrics/src/Hal/Report/Violations/Xml/Reporter.php on line 64
Thanks for your help
Thank you for your report, I'll try to see that ASAP, but I'm affraid it could take some time as I won't be available for the next weeks
A fix was provided but no release of the RC, sorry about this.
@raymond10 Could you please give it a try with version v3.0.0rc4 ?
Thanks a lot