0

when I am running the command to check phpcs issues,

 vendor/bin/phpcs --standard=Magento2 /filepath/


    ERROR: Referenced sniff "PHPCompatibility.FunctionUse.RemovedFunctions" does not exist
    Run "phpcs --help" for usage information

how to fix this?

2 Answers 2

0

To fix this issue add below code to composer.json file

 "scripts": {
    "post-install-cmd": [
      "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/,../../magento/php-compatibility-fork)"
    ],
    "post-update-cmd": [
      "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/,../../magento/php-compatibility-fork)"
    ]
}

and run

composer update 

This will fix your issue

Thank you!

0

You can run below command to fix the issue,

composer require "phpcompatibility/php-compatibility:dev-develop" --with-all-dependencies

It will add all required dependencies and fix the error you are facing.

Let me know it this solution works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.