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

--report-violations Class not found #276

Closed
alexz707 opened this issue Apr 11, 2017 · 2 comments
Closed

--report-violations Class not found #276

alexz707 opened this issue Apr 11, 2017 · 2 comments

Comments

@alexz707
Copy link

Hi,

I've installed PhpMetrics 2.1 with composer.

When I run this command:

phpmetrics --report-html=reports --report-xml=reports/xml.xml --report-violations=reports/vio.xml module

I get this output:

[phpmetrics] PHP Fatal error:  Uncaught Error: Class 'Hal\Report\Violations\Xml\OutputInterface' not found in /var/lib/jenkins/workspace/PROJECT/vendor/phpmetrics/phpmetrics/src/Hal/Report/Violations/Xml/Reporter.php:87
[phpmetrics] Stack trace:
[phpmetrics] #0 /var/lib/jenkins/workspace/PROJECT/vendor/phpmetrics/phpmetrics/src/Hal/Application/Application.php(71): Hal\Report\Violations\Xml\Reporter->generate(Object(Hal\Metric\Metrics))
[phpmetrics] #1 /var/lib/jenkins/workspace/PROJECT/vendor/phpmetrics/phpmetrics/bin/phpmetrics(20): Hal\Application\Application->run(Array)
[phpmetrics] #2 {main}
[phpmetrics]   thrown in /var/lib/jenkins/workspace/PROJECT/vendor/phpmetrics/phpmetrics/src/Hal/Report/Violations/Xml/Reporter.php on line 87
[phpmetrics] HTML report generated in "build/phpmetrics" directory
[phpmetrics] Result: 255

And I expected this to happen:

Just generate all reports. Error only happens because of the violations option!

I think the use Symfony\Component\Console\Output\OutputInterface;
has been forgotten ;)

Ragards Alex

@Halleck45
Copy link
Collaborator

Halleck45 commented Apr 11, 2017

Hi,

thanks for the report. PhpMetrics 2.1 does not use Symfony/Console ;)

This issue is now fixed with 26540ac1da7d263cd66f7628e47b22b46c6da97e

@alexz707
Copy link
Author

oh, I didn't notice it's not used. Just looked in my vendor folder of a project ;)
but thanks for the fast response! 👍
btw I found some includes (same one in different files) which seem to be incorrect (at least for me):
use Hal\Metric\Consolided

in
e.g. Hal\Report\Violations\Xml\Reporter

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

No branches or pull requests

2 participants