I really need to check php compatibility
In this video we will check for php compatibility on one of my old project and different versions of WordPress.
First we need the CodeSniffer tooling, we will download it will wget.
Next we make the CodeSniffer checker executable.
chmod +x phpcs.phar
The plugin is fetched directly from github release page. Currently the 9.3.5 is the most recent but you might want to check for a newer.
Let's unpack the tooling.
tar -xvzf 9.3.5.tar.gz
This command is what I run in the video. This works if your tooling and plugin is located in the directory parent of your current directory. What you don't want is to have the plugin in the same directory as you are checking or the checker will load the classes twice.
../phpcs.phar --extensions=php -p . --standard=../PHPCompatibility-9.3.5/PHPCompatibility --runtime-set testVersion 5.5