Detect Compatibility Issues With phpco

PHPCompatibility detects compatibility issues between your code and a specific version of PHP, making it very useful for PHP upgrades.

If you already have Docker installed on your machine, you can run this tool more easily with phpco. You merely need to execute two console commands from your project's root:

phpco() { docker run --init -v $PWD:/mnt/src:cached --rm -u "$(id -u):$(id -g)" frbit/phpco:latest $@; return $?; }
phpco -p --colors --extensions=php,phtml --runtime-set testVersion 7.4 . --ignore="vendor/"

Customize the options to your liking.

The phpco repository has more complete documentation.

Learn about more topics