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

PHP8 Issue on report-violations #494

Open
raymond10 opened this issue Jul 4, 2023 · 2 comments
Open

PHP8 Issue on report-violations #494

raymond10 opened this issue Jul 4, 2023 · 2 comments
Assignees
Milestone

Comments

@raymond10
Copy link

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

@niconoe- niconoe- self-assigned this Jul 4, 2023
@niconoe- niconoe- added the bug label Jul 4, 2023
@niconoe-
Copy link
Contributor

niconoe- commented Jul 4, 2023

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

niconoe- added a commit that referenced this issue Jul 24, 2023
Fix #494 violations reporter which was trying to rely on Violations directly, rather than ViolationsHandler
@niconoe- niconoe- added this to the v3.0.0 milestone Sep 14, 2023
@niconoe- niconoe- assigned raymond10 and unassigned niconoe- Sep 15, 2023
@niconoe-
Copy link
Contributor

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

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

No branches or pull requests

2 participants