Ignore deprecation of AnnotationsRegistry
Closed this issue · 2 comments
ORCA scans for deprecated function calls by default.
BLT uses ORCA as well as the AnnotationsRegistry from doctrine/annotations. Unfortunately, AnnotationsRegistry was deprecated even though no alternative currently exists (an alternative will come in the next major release). I consider this a bug in the annotations library, but the maintainer hasn't expressed willingness to fix the situation: doctrine/annotations#270
In order to get deprecation tests running again, I think the best solution would be for ORCA to add a phpstan ignoreErrors
directive to ignore the following deprecation error until the upstream bug with doctrine/annotations is fixed:
Call to deprecated method registerFile() of class Doctrine\Common\Annotations\AnnotationRegistry.
If there were any way to solve this within BLT without involving ORCA I definitely would, but it looks like the only way phstan can ignore false positives is via global configuration: phpstan/phpstan#786
Fixed, @danepowell. Thank you. You can patch ORCA while you're waiting for the next release if you like:
diff --git a/.travis.yml b/.travis.yml
index 458e93da..f2e48130 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -65,6 +65,7 @@ before_install:
- composer config --global repositories.blt path /tmp/blt-project
# Install ORCA.
- git clone --branch ${ORCA_VERSION} --depth 1 https://github.com/acquia/orca.git ../orca
+ - curl https://patch-diff.githubusercontent.com/raw/acquia/orca/pull/28.patch | git -C ../orca apply
- ../orca/bin/travis/before_install.sh
install:
Worked like a charm, thanks! acquia/blt@d911abf