Script to verify if your PHP code has the right syntax and if it is compatible with an specific version.
- Copy the file php-check.sh to the root of your project
- Run
chmod +x php-check.sh - Run
./php-check.sh
At the end of the execution, a folder called php_syntax_and_compatibility_reports will be created with the reports in it
- Create a script called phpSyntaxCheck-php-$version.sh to run the php lint based on the choosen version and save it in script
- Create a Dockerfile which will run the php version selected
- Create a .dockerignore file to skip the verification of the other files when building up the container
- Build the docker image with all necessary apps
- Run the docker container and execute PHP lint
- Starts the container for PHP Compatibility Check
- Save the Report files
- Clean upp all the created files
Feel free to change whatever you want