diff --git a/Dockerfile b/Dockerfile index ba49f0e..c6d3170 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM php:7.4-cli-alpine +FROM php:8.0-cli-alpine # Install PHP CodeSniffer -ARG PHPCS_RELEASE="3.5.3" +ARG PHPCS_RELEASE="3.6.0" RUN pear install PHP_CodeSniffer-$PHPCS_RELEASE # Install the PHPCompatibility standard -ARG PHPCOMP_RELEASE="9.3.4" +ARG PHPCOMP_RELEASE="9.3.5" RUN set -eux &&\ apk --no-cache add git &&\ mkdir -p "/opt/" &&\ @@ -17,7 +17,7 @@ RUN set -eux &&\ # Configure phpcs defaults RUN phpcs --config-set installed_paths /opt/PHPCompatibility &&\ phpcs --config-set default_standard PHPCompatibility &&\ - phpcs --config-set testVersion 7.4 &&\ + phpcs --config-set testVersion 8.0 &&\ phpcs --config-set report_width 120 # Configure PHP with all the memory we might need (unlimited) diff --git a/README.md b/README.md index e027448..02a7def 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,14 @@ phpco() { docker run --init -v $PWD:/mnt/src:cached --rm -u "$(id -u):$(id -g)" You can also add this snippet to your `.bashrc` or similar shell startup script. That way it will always be available whenever you open a new shell. ## Running phpco-docker -Now you can directly use the tool. This command will do a full check of all your code in the current directory for PHP 7.4 compatibility. +Now you can directly use the tool. This command will do a full check of all your code in the current directory for PHP 8.0 compatibility. ``` -phpco -p --colors --extensions=php --runtime-set testVersion 7.4 . +phpco -p --colors --extensions=php --runtime-set testVersion 8.0 . ``` As it completes you will see a list of found warnings and errors in your code. If you are getting a lot of warnings, but only want to deal with the stuff that will actually break, add `-n` to only show errors. -If you have also updated all of your dependencies and are sure they support the PHP version you want to migrate to, you can exclude the `vendor` folder completely to only check your own code. Checking for PHP version 7.4 is the default so we can also remove that part. +If you have also updated all of your dependencies and are sure they support the PHP version you want to migrate to, you can exclude the `vendor` folder completely to only check your own code. Checking for PHP version 8.0 is the default so we can also remove that part. ``` phpco -p --colors --extensions=php . -n --ignore="vendor/"