Skip to content
main
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

devdrops/php-toolbox

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

Available on Docker Hub at devdrops/php-toolbox. Also check the whole content description at the MicroBadger.

Features

TOOL RELEASE
PHP PHP 8.0.12 (cli) (built: Oct 21 2021 15:24:13) ( NTS )
Composer Composer 2.1.10 2021-10-29 22:34:57
phpunit/phpunit PHPUnit 9.5.10 by Sebastian Bergmann and contributors.
squizlabs/php_codesniffer PHP_CodeSniffer version 3.6.1 (stable) by Squiz (http://www.squiz.net)
friendsofphp/php-cs-fixer PHP CS Fixer 3.2.1 Mountains by Fabien Potencier and Dariusz Ruminski
phpmd/phpmd PHPMD 2.10.2
behat/behat behat 3.8.1
phploc/phploc phploc 7.0.2 by Sebastian Bergmann.
phpstan/phpstan PHPStan - PHP Static Analysis Tool 0.12.25
icanhazstring/composer-unused 0.5.6
vimeo/psalm Psalm 4.11.2@6fba5eb554f9507b72932f9c75533d8af593688d

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 acessed 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