odan / odan.github.io

My blog
https://odan.github.io/
1 stars 3 forks source link

2020/12/22/php8-compatibility-check #2

Open utterances-bot opened 9 months ago

utterances-bot commented 9 months ago

PHP 8 Compatibility Check | Daniel Opitz - Blog

To check whether your code is compatible with PHP 8 or not, you may find this tool very useful.

https://odan.github.io/2020/12/22/php8-compatibility-check.html

filoteanuadrian commented 9 months ago

I am getting the error: There are no commands defined in the "sniffer" namespace.

Any ideea why?

odan commented 9 months ago

@filoteanuadrian This error message indicates that Composer does not recognize the custom script you added to your composer.json file.

Make sure that you have added the custom script in the correct place in your composer.json file. It should be added in the "scripts" section as follows:

"scripts": {
    "sniffer:php8": "phpcs -p ./src --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.2"
}