Skip to content

jakzal/toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Toolbox

Build Status Build Status

Helps to discover and install tools.

Use cases

Toolbox started its life as a simple script in the phpqa docker image. Its purpose was to install set of tools while building the docker image and it's still its main goal. It has been extracted as a separate project to make maintenance easier and enable new use cases.

Available tools

Name Description PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
behat Helps to test business expectations âś… âś… âś… âś…
box Fast, zero config application bundler with PHARs âś… âś… âś… âś…
box-3 Fast, zero config application bundler with PHARs ❌ ✅ ✅ ✅
churn Discovers good candidates for refactoring âś… âś… âś… âś…
codeception Codeception is a BDD-styled PHP testing framework âś… âś… âś… âś…
composer Dependency Manager for PHP âś… âś… âś… âś…
composer-bin-plugin Composer plugin to install bin vendors in isolated locations âś… âś… âś… âś…
composer-lock-diff Composer plugin to check what has changed after a composer update âś… âś… âś… âś…
composer-normalize Composer plugin to normalize composer.json files âś… âś… âś… âś…
composer-require-checker Verify that no unknown symbols are used in the sources of a package. ❌ ✅ ✅ ✅
composer-require-checker-3 Verify that no unknown symbols are used in the sources of a package. âś… âś… âś… âś…
composer-unused Show unused packages by scanning your code âś… âś… âś… âś…
cyclonedx-php-composer Composer plugin to create Software-Bill-of-Materials (SBOM) in CycloneDX format âś… âś… âś… âś…
dephpend Detect flaws in your architecture âś… âś… âś… âś…
deprecation-detector Finds usages of deprecated code âś… âś… âś… âś…
deptrac Enforces dependency rules between software layers âś… âś… âś… âś…
diffFilter Applies QA tools to run on a single pull request âś… âś… âś… âś…
ecs Sets up and runs coding standard checks âś… âś… âś… âś…
gherkin-lint-php Gherkin linter for PHP âś… âś… âś… âś…
infection AST based PHP Mutation Testing Framework âś… âś… âś… âś…
jack Helps to upgrade outdated Composer dependencies incrementally âś… âś… âś… âś…
kahlan Kahlan is a full-featured Unit & BDD test framework a la RSpec/JSpec âś… âś… âś… âś…
larastan PHPStan extension for Laravel âś… âś… âś… âś…
lines CLI tool for quick metrics of PHP projects âś… âś… âś… âś…
local-php-security-checker Checks composer dependencies for known security vulnerabilities âś… âś… âś… âś…
parallel-lint Checks PHP file syntax âś… âś… âś… âś…
paratest Parallel testing for PHPUnit âś… âś… âś… âś…
pdepend Static Analysis Tool âś… âś… âś… âś…
phan Static Analysis Tool âś… âś… âś… âś…
phive PHAR Installation and Verification Environment âś… âś… âś… âś…
php-cs-fixer PHP Coding Standards Fixer âś… âś… âś… âś…
php-fuzzer A fuzzer for PHP, which can be used to find bugs in libraries by feeding them 'random' inputs âś… âś… âś… âś…
php-semver-checker Suggests a next version according to semantic versioning âś… âś… âś… âś…
phpa Checks for weak assumptions âś… âś… âś… âś…
phparkitect Helps to put architectural constraints in a PHP code base âś… âś… âś… âś…
phpat Easy to use architecture testing tool âś… âś… âś… âś…
phpbench PHP Benchmarking framework âś… âś… âś… âś…
phpca Finds usage of non-built-in extensions âś… âś… âś… âś…
phpcb PHP Code Browser âś… âś… âś… âś…
phpcbf Automatically corrects coding standard violations âś… âś… âś… âś…
phpcodesniffer-composer-install Easy installation of PHP_CodeSniffer coding standards (rulesets). âś… âś… âś… âś…
phpcov a command-line frontend for the PHP_CodeCoverage library ❌ ✅ ✅ ✅
phpcpd Copy/Paste Detector âś… âś… âś… âś…
phpcs Detects coding standard violations âś… âś… âś… âś…
phpcs-security-audit Finds vulnerabilities and weaknesses related to security in PHP code âś… âś… âś… âś…
phpdd Finds usage of deprecated features âś… âś… âś… âś…
phpDocumentor Documentation generator âś… âś… âś… âś…
phpinsights Analyses code quality, style, architecture and complexity âś… âś… âś… âś…
phplint Lints php files in parallel âś… âś… âś… âś…
phploc A tool for quickly measuring the size of a PHP project âś… âś… âś… âś…
phpmd A tool for finding problems in PHP code âś… âś… âś… âś…
phpmetrics Static Analysis Tool âś… âś… âś… âś…
phpmnd Helps to detect magic numbers âś… âś… âś… âś…
phpspec SpecBDD Framework âś… âś… âś… âś…
phpstan Static Analysis Tool âś… âś… âś… âś…
phpstan-banned-code PHPStan rules for detecting calls to specific functions you don't want in your project âś… âś… âś… âś…
phpstan-beberlei-assert PHPStan extension for beberlei/assert âś… âś… âś… âś…
phpstan-deprecation-rules PHPStan rules for detecting deprecated code âś… âś… âś… âś…
phpstan-doctrine Doctrine extensions for PHPStan âś… âś… âś… âś…
phpstan-ergebnis-rules Additional rules for PHPstan âś… âś… âś… âś…
phpstan-larastan Separate installation of phpstan for larastan âś… âś… âś… âś…
phpstan-phpunit PHPUnit extensions and rules for PHPStan âś… âś… âś… âś…
phpstan-strict-rules Extra strict and opinionated rules for PHPStan âś… âś… âś… âś…
phpstan-symfony Symfony extension for PHPStan âś… âś… âś… âś…
phpstan-webmozart-assert PHPStan extension for webmozart/assert âś… âś… âś… âś…
phpunit The PHP testing framework ❌ ✅ ✅ ✅
phpunit-10 The PHP testing framework (10.x version) âś… âś… âś… âś…
phpunit-11 The PHP testing framework (11.x version) âś… âś… âś… âś…
phpunit-8 The PHP testing framework (8.x version) âś… âś… âś… âś…
phpunit-9 The PHP testing framework (9.x version) âś… âś… âś… âś…
pint Opinionated PHP code style fixer for Laravel âś… âś… âś… âś…
psalm Finds errors in PHP applications âś… âś… âś… âś…
psalm-plugin-doctrine Stubs to let Psalm understand Doctrine better âś… âś… âś… âś…
psalm-plugin-phpunit Psalm plugin for PHPUnit âś… âś… âś… âś…
psalm-plugin-symfony Psalm Plugin for Symfony âś… âś… âś… âś…
psecio-parse Scans code for potential security-related issues âś… âś… âś… âś…
rector Tool for instant code upgrades and refactoring âś… âś… âś… âś…
roave-backward-compatibility-check Tool to compare two revisions of a class API to check for BC breaks âś… âś… âś… âś…
simple-phpunit Provides utilities to report legacy tests and usage of deprecated code âś… âś… âś… âś…
twig-cs-fixer Automatically corrects twig files following the official coding standard rules âś… âś… âś… âś…
twig-lint Standalone cli twig 1.X linter âś… âś… âś… âś…
twig-linter Standalone cli twig 3.X linter âś… âś… âś… âś…
twigcs The missing checkstyle for twig! ✅ ✅ ✅ ❌
yaml-lint Compact command line utility for checking YAML file syntax âś… âś… âś… âś…

Removed tools

Name Summary
analyze Visualizes metrics and source code
box-legacy Legacy version of box
design-pattern Detects design patterns
parallel-lint Checks PHP file syntax
pest The elegant PHP Testing Framework
php-coupling-detector Detects code coupling issues
php-formatter Custom coding standards fixer
phpcf Finds usage of deprecated features
phpda Generates dependency graphs
phpdoc-to-typehint Automatically adds type hints and return types based on PHPDocs
phpstan-exception-rules PHPStan rules for checked and unchecked exceptions
phpstan-localheinz-rules Additional rules for PHPstan
phpunit-5 The PHP testing framework (5.x version)
phpunit-7 The PHP testing framework (7.x version)
security-checker Checks composer dependencies for known security vulnerabilities
testability Analyses and reports testability issues of a php codebase

Installation

Get the toolbox.phar from the latest release. The command below should do the job:

curl -Ls https://github.com/jakzal/toolbox/releases/latest/download/toolbox.phar -o toolbox && chmod +x toolbox

Usage

List available tools

./toolbox list-tools

Filter tools by tags

To exclude some tools from the listing multiple --exclude-tag options can be added. The --tag option can be used to filter tools by tags.

./toolbox list-tools --exclude-tag exclude-php:8.2 --exclude-tag foo --tag bar

Install tools

./toolbox install

Install tools in a custom directory

By default tools are installed in the /usr/local/bin directory. To perform an installation in another location, pass the --target-dir option to the install command. Also, to change the location composer packages are installed in, export the COMPOSER_HOME environment variable.

mkdir /tools
export COMPOSER_HOME=/tools/.composer
export PATH="/tools:$COMPOSER_HOME/vendor/bin:$PATH"
./toolbox install --target-dir /tools

The target dir can also be configured with the TOOLBOX_TARGET_DIR environment variable.

Dry run

To only see what commands would be executed, use the dry run mode:

./toolbox install --dry-run

Filter tools by tags

To exclude some tools from the installation multiple --exclude-tag options can be added. The --tag option can be used to filter tools by tags.

./toolbox install --exclude-tag exclude-php:8.2 --exclude-tag foo --tag bar

Test if installed tools are usable

./toolbox test

Dry run

To only see what commands would be executed, use the dry run mode:

./toolbox test --dry-run

Filter tools by tags

To exclude some tools from the generated test command multiple --exclude-tag options can be added. The --tag option can be used to filter tools by tags.

./toolbox test --exclude-tag exclude-php:8.2 --exclude-tag foo --tag bar

Tools definitions

By default the following files are used to load tool definitions:

  • resources/pre-installation.json
  • resources/architecture.json
  • resources/checkstyle.json
  • resources/compatibility.json
  • resources/composer.json
  • resources/deprecation.json
  • resources/documentation.json
  • resources/linting.json
  • resources/metrics.json
  • resources/phpstan.json
  • resources/psalm.json
  • resources/refactoring.json
  • resources/security.json
  • resources/test.json
  • resources/tools.json

Definitions can be loaded from customised files by passing the --tools option(s):

./toolbox list-tools --tools path/to/file1.json --tools path/to/file2.json

Tool definition location(s) can be also specified with the TOOLBOX_JSON environment variable:

TOOLBOX_JSON='path/to/file1.json,path/to/file2.json' ./toolbox list-tools

Tool tags

Tools can be tagged in order to enable grouping and filtering them.

The tags below have a special meaning:

  • pre-installation - these tools will be installed before any other tools.
  • exclude-php:8.2, exclude-php:8.3 etc - used to exclude installation on the specified php version.

Contributing

Please read the Contributing guide to learn about contributing to this project. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

About

Helps to discover and install tools

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 26