A collection of PHP testing tools bundled into a docker container.
See below in Commands for all available parameters
docker run --rm --volume c:/work/myapp:/srv/app segrax/php-testing testsdocker run --rm --volume c:/work/myapp:/srv/app segrax/php-testing phpcbfSome tools require configuration, place these files in the root of the volume mount (or inside /app if it exists)
| Tool | File |
|---|---|
| phpstan | /phpstan.neon |
| psalm | /psalm.xml |
| phpunit | /phpunit.xml |
Each tool can be either individually executed or related tools sequentually. To run an individual tool, simply change the command on the end of the docker run command.
| Command | Description | Tool |
|---|---|---|
| composer-install | Execute a composer install, with optimization | Composer |
| composer-install-dev | Execute a development install | Composer |
| composer-update | Execute an update | Composer |
| phpassume | Find assumptions | PHP Assumptions |
| phplint | Validate php syntax | PHP Parallel Lint |
| phpcbf | Fix PSR1 and PSR12 violations | PHP CBF |
| phpcs | Validate against PSR1 and PSR12 | PHP CodeSniffer |
| phpcpd | Find copy and pasted code | PHP Copy/Paste Detector |
| phpmd | Find messy code | PHP Mess Detector |
| phpstan | Find code mistakes | PHP Static Analysis Tool |
| phpunit | Execute phpunit tests | PHPUnit |
| psalm | Find code mistakes | Psalm |
| Command | Tools |
|---|---|
| tools-code | phpassume, phplint, phpcs, phpcpd, phpmd |
| tools-static | phpstan, psalm |
| tests | tools-code, tools-static, phpunit |
- json
- sockets
- xdebug
- zip
The MIT License (MIT). Please see License File for more information.