Copy below individual or all command(s) to get latest update.
composer global require squizlabs/php_codesniffer
composer global require wp-coding-standards/wpcs
composer global require phpcompatibility/php-compatibility
composer global require dealerdirect/phpcodesniffer-composer-installer
Update: 26 – March 2019
Getting notice Package wimg/php-compatibility is abandoned, you should avoid using it. Use phpcompatibility/php-compatibility instead. while updating the plugin.
To fix this issue:
Used composer global require phpcompatibility/php-compatibility
Instead of composer global require wimg/php-compatibility
λ composer global require phpcompatibility/php-compatibility
Changed current directory to C:/Users/MaheshW/AppData/Roaming/Composer
Using version ^9.1 for phpcompatibility/php-compatibility
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing phpcompatibility/php-compatibility (9.1.1): Downloading (100%)
phpcompatibility/php-compatibility suggests installing roave/security-advisories (dev-master || Helps prevent installing dependencies with known security issues.)
Package wimg/php-compatibility is abandoned, you should avoid using it. Use phpcompatibility/php-compatibility instead.