Skip to content

devdrops/php-toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

devdrops/php-toolbox

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

Available on Docker Hub at devdrops/php-toolbox.

Attention

From now on, I'll publish an image for every minor version of PHP, where latest will be the most stable release at the moment:

  • 7.4
  • 8.0
  • 8.1
  • 8.2

Check each directory for more information regarding each version πŸ˜‰

Install

docker pull devdrops/php-toolbox

Build it!

First, clone this repo. Then, navigate to it's root source.

For development:

./develop

Usage

All tools can be accessed by executing:

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest CHOOSEN_BINARY

Where CHOOSEN_BINARY is the binary you're looking for πŸ˜‰

Examples

You can run this image from whenever the folder you wish. But, just to give a few examples, consider the following structure for instance:

. └── my-project β”œβ”€β”€ Abstract.php β”œβ”€β”€ bootstrap.php β”œβ”€β”€ composer.json └── vendor 

All the commands below will be executed from the project's root folder, my-project.

PHP

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest php -v

Composer

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest composer install

PHPUnit

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpunit --version

PHP_CodeSniffer

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpcs --standard=PSR2 Abstract.php

PHP CS Fixer

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest php-cs-fixer fix Abstract.php

PHP Mess Detector

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpmd Abstract.php text codesize

Behat

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest behat --version

phploc

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phploc --version

phpstan

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpstan --version