Skip to content

🐳 🐘 A Docker image designed for PHP developers that care about code quality.

License

Notifications You must be signed in to change notification settings

devdrops/php-toolbox

Repository files navigation

devdrops/php-toolbox 🐳 🐘

Hadolint status Trivy status Snyk Container status Docker Hub status

A Docker image designed for PHP developers that care about code quality.

Available on Docker Hub at devdrops/php-toolbox.

The Project

Each PHP version, starting from 7.4, have at least 2 tags: one version without Xdebug, and another with 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.

Install

docker pull devdrops/php-toolbox

Usage

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 😉

Build it!

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.