A Docker image designed for PHP developers that care about code quality.
Available on Docker Hub at devdrops/php-toolbox.
Each PHP version, starting from 7.4, have at least 2 tags: one version without Xdebug, and another with Xdebug.
- PHP 7.4:
7.4
,7.4-xdebug
- PHP 8.0:
8.0
,8.0-xdebug
- PHP 8.1:
8.1
,8.1-xdebug
- PHP 8.2:
8.2
,8.2-xdebug
- PHP 8.3:
latest
,8.3
,8.3-xdebug
The following tools are available:
Tool | Description |
---|---|
PHP | The PHP programming language. |
PHPUnit | PHPUnit is a programmer-oriented testing framework for PHP. |
PHP_CodeSniffer | PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. |
PHP CBF | PHP Code Beautifier and Fixer automatically correct coding standard violations. |
PHP CS Fixer | A tool to automatically fix PHP Coding Standards issues. |
PHP Mess Detector | Checks for bugs, suboptimal code, overcomplicated expressions, unused parameters etc. |
Behat | A php framework for autotesting your business expectations. |
PHPStan | PHPStan finds bugs in your code without writing tests. |
composer-unused | Show unused composer dependencies by scanning your code. |
Psalm | Prevent runtime errors and fix bugs automatically. |
Pest | The elegant PHP testing framework. |
Rector | Instant Upgrades and Automated Refactoring of any PHP 5.3 code. |
PHPArkitect | Put your architectural rules under test! |
phpspec | A php toolset to drive emergent design by specification. |
Codeception | Codeception collects and shares best practices and solutions for testing PHP web applications. |
Infection | PHP Mutation Testing Framework |
Deptrac | Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects. |
PhpMetrics | PhpMetrics provides various metrics about PHP projects. |
PDepend | PHP_Depend software analyzer and metric tool. |
docker pull devdrops/php-toolbox
All tools can be accessed by executing:
docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest <CHOOSEN_TOOL>
Where <CHOOSEN_TOOL>
is the binary you're looking for 😉
Clone this repository. Then, using a terminal window, go to it's root directory. Each version folder have it's own
Makefile
with the following commands (you can run make help
to see a brief explanation of each command):
build Build the official tag.
debug Build only the image with Xdebug.
develop Build '*-dev' tag, including Xdebug.
hadolint Lint ./Dockerfile with Hadolint
help Print information of each Make task.
latest Build two images: 1. official tag, 2. official tag Xdebug.
push Pushes to Docker Hub two images: 1. official tag, 2. official tag Xdebug.
release Build and deploy official tags.
shellcheck Run shellcheck to scan sh files at ./helpers.