Open placid2000 opened 7 years ago
Can you run it in verbose mode ?
I run : ./bin/deprecation-detector check src/ --verbose
Result: Deprecation detection: 261/261Finished searching for deprecations.
Rendering output...
Finished rendering output.
There are no violations - congratulations! Checked 261 source files in 39.297 seconds, 94 MB memory used
Here is just one example of deprecation in the Entity folder it should have found since addViolationAt is deprecated: $context->addViolationAt('financingPlan', 'Kosten dürfen nicht leer sein');
I have the same behavior, this tool already returns There are no violations - congratulations!
is the project open source ? So I can try to recreate the issue ?
The issue comes from an incompatibility with phpdocumentor/reflection-docblock versions.
In your composer.json, you have mentioned
"phpdocumentor/reflection-docblock": "~2.0 || ~3.0 || ~4.0"
But in your Visitor into hasDeprecatedDocComment()
or getDeprecatedDocComment()
, you create the DocBlock in an old way :
$docBlock = new DocBlock((string) $node->getDocComment());
The new way for last version of phpdocumentor/reflection-docblock
should be like this :
$docBlock = (DocBlockFactory::createInstance())->create((string) $node->getDocComment());
I have installed your detector with version 4.2 of reflection-docblock.
I had the same problem with Symfony 2.8 I disabled cache and then the command started working correctly.
php deprecation-detector.phar check src/ vendor/ --no-cache
Also works if manually set cache dir
php deprecation-detector.phar check src/ vendor/ --cache-dir=app/cache
@achasseux do you want to create a pr and fix it ?
@MarvinKlemp I can work on this issue next week, not before I 'm OK to create a PR
I installed deprecation-detector on dev-master and I'm on Symfony 2.8
When I run
sh bin/deprecation-detector check src/ vendor/
orsh bin/deprecation-detector check src/ .rules
orsh bin/deprecation-detector check src/
, it saysEven that there are a lot of deprecations! For some reason it doesn't find any.. Did I miss anything ?