PHPackages                             linkorb/php-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. linkorb/php-tools

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

linkorb/php-tools
=================

PHP Tools: collection of isolated tools for qa, test, etc

v1.0.0(4y ago)322MITDockerfilePHP &gt;=7.2.0

Since Jul 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/linkorb/php-tools)[ Packagist](https://packagist.org/packages/linkorb/php-tools)[ Docs](http://www.github.com/linkorb/php-tools)[ RSS](/packages/linkorb-php-tools/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

> NOTE: Given the fact that this php-tools repo has identical goals to , we've decided archive php-tools, and contribute to phpqa instead

php-tools
=========

[](#php-tools)

A collection of tools to use in PHP-based projects for static analysis, unit/bdd testing, documentation, etc.

Usage
-----

[](#usage)

PHP developers are agreeing that PHP tools should not be like regular composer dependencies (also not through require-dev), but instead be installed globally.

- [https://twitter.com/s\_bergmann/status/999635212723212288](https://twitter.com/s_bergmann/status/999635212723212288)
- [composer/composer#5390](https://github.com/composer/composer/issues/5390)
- [composer/composer#9636](https://github.com/composer/composer/issues/9636)
-  ("we are unable to provide support on issues stemming from dependency conflicts")
-  (see "But wait? What about Composer?")

A primary reason for this is that adding many tools to require-dev significantly increases the complexity of the dependencies and constraints of your project. This can quickly lead to conflicts that are hard or impossible to solve. By installing these tools "globally", your project's dependencies will remain simple.

This repository contains the most commonly used PHP tools, so you can easily install them once, globally. You can then run these tools from all of your projects during testing, documentation generation, etc.

Installation
------------

[](#installation)

```
git clone https://github.com/linkorb/php-tools.git
cd php-tools
composer install # this recursively installs the tools inside of the `tools/` directory.

```

Update your PATH environment variable
-------------------------------------

[](#update-your-path-environment-variable)

To make sure you can call the available tools from any (project) directory, you'll need to add this repository's `bin/` directory to your PATH environment variable:

```
export PATH="/path/to/php-tools/bin:$PATH"

```

You can now confirm if you can successfully run `phpstan --help` from other directories.

To make this change permanent, add the previous line to your `~/.bashrc`, `~/.profile` or similar shell init script. Don't forget to start a new login session to check if it works.

If you're using [linuxserver's code-server](https://hub.docker.com/r/linuxserver/code-server), you can pass a PATH variable as part of your docker-compose.yml file.

Troubleshooting
---------------

[](#troubleshooting)

### Uncaught Error: Undefined constant Bamarni\\Composer\\Bin\\Command\\BinCommand::SUCCESS

[](#uncaught-error-undefined-constant-bamarnicomposerbincommandbincommandsuccess)

This can occur if `composer-bin-plugin` is unable to resolve the path to binaries saved in the `php-tools/bin` folder. Adding `path/to/php-tools/bin` to your PATH environment variable before running `composer install` may fix this bug.

Alternatives
------------

[](#alternatives)

- Listing tools in "require-dev". This quickly leads to complex dependency conflicts (sometimes unsolvable)
- Installing tools with "composer global install". While this keeps your project dependencies simple, it still combines the constraints of all your tools, still leading to complex dependency graphs.
- Installing "phar" versions of your tools. Nice, but downloading and updating these executables is cumbersome
- Using [phive and phar.io](https://phar.io/) to manage your .phar executables. Not all tools are on phar.io, and leads to a lot of duplication
- Using [phpqa docker container](https://github.com/jakzal/phpqa). Complicated to reuse build configuration between local dev and CI (should be identical)

How does it work?
-----------------

[](#how-does-it-work)

In the `bin/` directory, you'll find a symlink for each of the available tools (phpstan, phpmd, phpcs, etc). These symlinks point to the tools themselves inside the tools/ directory.

This project uses [composer-bin-plugin](https://github.com/bamarni/composer-bin-plugin) to manage the `tools/` directory where every tool get's its own sub-directory (i.e. `tools/phpstan`).

Each of those sub-directories is a mini standalone composer project with a single dependency (the tool). You'll find a `composer.json` and a `composer.lock` file in each tool directory.

You can run `composer install` in the `php-tools` root directory, which will trigger a `composer install` inside each tool sub-directory too.

Adding new tools
----------------

[](#adding-new-tools)

You can use the `composer-bin-plugin` to add new tools to the collection:

```
composer bin phpcs require squizlabs/php_codesniffer

```

- The name after `bin` is the name of the subdirectory in `tools/` that will be created for this tool.
- The part after `require` is the composer package name of the tool as it is registered on packagist.org

Finally, create a symlink to your newly added tool(s):

```
cd bin/
ln -s ../tools/phpcs/vendor/bin/phpcs bin/phpcs
ln -s ../tools/phpcs/vendor/bin/phpcbf bin/phpcbf

```

Now commit:

- the tools/phpcs/composer.json and .lock files
- any symlinks you have created in `bin/`

The `.gitignore` file of this project should ensure you are not committing any vendor/ directories.

The `.gitattributes` ensures your composer.lock files are managed as "binary" files, to avoid merge conflicts.

License
-------

[](#license)

MIT. Please refer to the [license file](LICENSE) for details.

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1768d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (9 commits)")[![achianumba](https://avatars.githubusercontent.com/u/39227511?v=4)](https://github.com/achianumba "achianumba (2 commits)")[![prajapati-kaushik](https://avatars.githubusercontent.com/u/10140681?v=4)](https://github.com/prajapati-kaushik "prajapati-kaushik (1 commits)")

---

Tags

phptoolslinkorb

### Embed Badge

![Health badge](/badges/linkorb-php-tools/health.svg)

```
[![Health](https://phpackages.com/badges/linkorb-php-tools/health.svg)](https://phpackages.com/packages/linkorb-php-tools)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[letsdrink/ouzo-goodies

Utility classes, test assertions and mocking framework extracted from Ouzo framework.

132617.9k7](/packages/letsdrink-ouzo-goodies)[quizlet/hammock

Hammock is a stand-alone mocking library for Hacklang.

27445.5k](/packages/quizlet-hammock)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)[phrozenbyte/phpunit-array-asserts

Provides various array-related PHPUnit assertions, primarily used for API testing.

1055.0k1](/packages/phrozenbyte-phpunit-array-asserts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
