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

Pin down to compatible coding-standard dependency #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

galfit82
Copy link

Fixes errors occuring due to changed interfaces in recent slevomat/coding-standard ^8.0 releases.

@b3nl
Copy link
Contributor

b3nl commented Nov 18, 2023

May I ask, what happend? What is the intention? I personally use it for example with slevomat 8.13.4 and it looks good. @galfit82

@galfit82
Copy link
Author

@b3nl here's the error we get when running phpcs with newer slevomat versions:

phpcbf     -d memory_limit=1024M     --standard=./tools/config/phpcs.xml     ./src/custom/static-plugins
PHP Fatal error:  Uncaught Error: Call to undefined method SlevomatCodingStandard\Helpers\AnnotationHelper::getAnnotationsByName() in /root/tools/PHP_CodeSniffer/src/Standards/BestIt/Sniffs/TypeHints/ExplicitAssertionsSniff.php:85
Stack trace:
#0 /root/tools/PHP_CodeSniffer/vendor/squizlabs/php_codesniffer/src/Files/File.php(498): BestIt\Sniffs\TypeHints\ExplicitAssertionsSniff->process()
#1 /root/tools/PHP_CodeSniffer/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php(92): PHP_CodeSniffer\Files\File->process()
#2 /root/tools/PHP_CodeSniffer/vendor/squizlabs/php_codesniffer/src/Runner.php(632): PHP_CodeSniffer\Files\LocalFile->process()
#3 /root/tools/PHP_CodeSniffer/vendor/squizlabs/php_codesniffer/src/Runner.php(438): PHP_CodeSniffer\Runner->processFile()
#4 /root/tools/PHP_CodeSniffer/vendor/squizlabs/php_codesniffer/src/Runner.php(204): PHP_CodeSniffer\Runner->run()
#5 /root/tools/PHP_CodeSniffer/vendor/squizlabs/php_codesniffer/bin/phpcbf(18): PHP_CodeSniffer\Runner->runPHPCBF()
#6 /root/tools/PHP_CodeSniffer/vendor/bin/phpcbf(119): include('...')
#7 {main}
  thrown in /root/tools/PHP_CodeSniffer/src/Standards/BestIt/Sniffs/TypeHints/ExplicitAssertionsSniff.php on line 85

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

Successfully merging this pull request may close these issues.

2 participants