PHPackages                             bound1ess/adviser - 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. [CLI &amp; Console](/categories/cli)
4. /
5. bound1ess/adviser

ActiveLibrary[CLI &amp; Console](/categories/cli)

bound1ess/adviser
=================

A CLI application that checks your project for various possible improvements.

1.0.10(11y ago)10371MITPHPPHP &gt;=5.4.0

Since Jan 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/bound1ess/adviser)[ Packagist](https://packagist.org/packages/bound1ess/adviser)[ Docs](https://github.com/bound1ess/adviser)[ RSS](/packages/bound1ess-adviser/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (18)Used By (0)

Adviser [![Build Status](https://camo.githubusercontent.com/a46acaca26f888e063ef8842b9632c9597bfbe3f9eb3acaf2cc33a80440fff88/68747470733a2f2f7472617669732d63692e6f72672f626f756e64316573732f616476697365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bound1ess/adviser)
==========================================================================================================================================================================================================================================================================================

[](#adviser-)

Adviser is a CLI application that checks your PHP project for various possible improvements.

Heavily inspired by [phppackagechecklist.com](http://phppackagechecklist.com).

Motivation
----------

[](#motivation)

- Do I have some sort of a license file?
- Is my composer.json valid?
- Is my code PSR-2 compatible?
- Are the repository tags and settings OK?

I often ask myself such questions. And I got tired of checking it all manually every time. Here comes Adviser to make things a lot easier.

Navigation
----------

[](#navigation)

- [Installing](#installing)
- [Using](#using)
- [Configuring](#configuring)
- [Extending](#extending)
- [Contributing](#contributing)
- [Additional information](#additional-information)

Installing
----------

[](#installing)

### Composer way

[](#composer-way)

Just run in your terminal (you should be in your project's root directory):

```
composer require --dev bound1ess/adviser
```

Or, if you don't have *Composer* installed globally:

```
curl -sS https://getcomposer.org/installer | php
./composer.phar require --dev bound1ess/adviser
```

Now you should be able to run `vendor/bin/adviser` and see Adviser's CLI.

### Building a PHAR (Box is required)

[](#building-a-phar-box-is-required)

This is not very difficult to do either, just run:

```
box --version
git clone https://github.com/bound1ess/adviser.git
cd adviser
composer update # Assuming that it's installed globally.
make build-phar
```

[![](https://camo.githubusercontent.com/04bd2a84613a40b689dfdb64fe471688f7a1714010ba5f6799c140cf23093eb2/687474703a2f2f692e696d6775722e636f6d2f475344714359632e706e67)](https://camo.githubusercontent.com/04bd2a84613a40b689dfdb64fe471688f7a1714010ba5f6799c140cf23093eb2/687474703a2f2f692e696d6775722e636f6d2f475344714359632e706e67)

Now you can use `builds/adviser.phar`, or (only if you want to!) you can also do this:

```
sudo mv builds/adviser.phar /usr/local/bin/adviser
```

Now you can use `adviser` (everywhere!) instead of `builds/adviser.phar`.

Using
-----

[](#using)

### analyse

[](#analyse)

This command will analyse (*suggest possible improvements*) the current working directory.

[![](https://camo.githubusercontent.com/2dcf8a1ea25cfd5d86a9f1d0d67561fbdce775ffb3adb902ea6d93f10bd52857/687474703a2f2f692e696d6775722e636f6d2f47796c724330522e706e67)](https://camo.githubusercontent.com/2dcf8a1ea25cfd5d86a9f1d0d67561fbdce775ffb3adb902ea6d93f10bd52857/687474703a2f2f692e696d6775722e636f6d2f47796c724330522e706e67)

### analyse --formatter="formattername"

[](#analyse---formatterformattername)

Same, but the output will be formatted depending on the formatter you choose.

[![](https://camo.githubusercontent.com/f4a1094d0e3e822f0de184b865a2902c61a1b484af2ab41e4b47d22b46f0397a/687474703a2f2f692e696d6775722e636f6d2f39467165496b522e706e67)](https://camo.githubusercontent.com/f4a1094d0e3e822f0de184b865a2902c61a1b484af2ab41e4b47d22b46f0397a/687474703a2f2f692e696d6775722e636f6d2f39467165496b522e706e67)

Available formatters:

- `plaintext` (`Adviser\Output\Formatters\PlainTextFormatter`).

### analyse-repository name \[--formatter="..."\]

[](#analyse-repository-name---formatter)

The `name` argument here is a Github repository name (e.g. `bound1ess/adviser`). This command will make a local clone of it, run the `analyse` command, then remove it (directory).

[![](https://camo.githubusercontent.com/fbbe64fa9716c9bb65d2000aa353458c2f832ba4afbf7c52123858067ba5f502/687474703a2f2f692e696d6775722e636f6d2f35396b664263632e706e67)](https://camo.githubusercontent.com/fbbe64fa9716c9bb65d2000aa353458c2f832ba4afbf7c52123858067ba5f502/687474703a2f2f692e696d6775722e636f6d2f35396b664263632e706e67)

Configuring
-----------

[](#configuring)

*Adviser* can be configured via an `adviser.yml` file placed in the working directory.

### Adding a Formatter

[](#adding-a-formatter)

```
# Add a new formatter.
formatters:
    - "Your\Custom\Formatter\ClassName"
    # ...
```

### Adding a Validator

[](#adding-a-validator)

```
# Add a new validator.
validators:
    - "Your\Custom\Validator\ClassName"
    # ...
```

### Configuring a Validator

[](#configuring-a-validator)

#### ChangelogValidator

[](#changelogvalidator)

```
Adviser\Validators\ChangelogValidator:
    files:
        - "CHANGELOG.md"
        # ...
```

#### CIValidator

[](#civalidator)

```
Adviser\Validators\CIValidator:
    allowedVersions:
        - "5.6"
        - "5.5"
        - "5.4"
        - "hhvm"
        # ...
```

#### ComposerValidator

[](#composervalidator)

```
Adviser\Validators\ComposerValidator:
    autoloader: "psr-4"
    source_directory: "src"
```

#### ContributingValidator

[](#contributingvalidator)

```
Adviser\Validators\ContributingValidator:
    files:
        - "CONTRIBUTING.md"
        # ...
```

#### FrameworkValidator

[](#frameworkvalidator)

```
Adviser\Validators\FrameworkValidator:
    frameworks:
        - "laravel/framework"
        # ...
```

#### LicenseValidator

[](#licensevalidator)

```
Adviser\Validators\LicenseValidator:
    files:
        - "LICENSE.md"
        # ...
```

#### ReadmeValidator

[](#readmevalidator)

```
Adviser\Validators\ReadmeValidator:
    files:
        - "README.md"
        # ...
```

#### TestValidator

[](#testvalidator)

```
Adviser\Validators\TestValidator:
    frameworks:
        - "phpunit/phpunit"
        # ...
    frameworkToFiles:
        phpunit/phpunit:
            - "phpunit.xml"
            - "phpunit.xml.dist"
            # ...
        # ...
```

Extending
---------

[](#extending)

1. Write the code.
2. Don't forget to test it!
3. Add it to the `adviser.yml` configuration file (see [Configuring](#configuring) section).
4. Done! Share your work with others if you want to.

### Creating a Validator

[](#creating-a-validator)

```
class YourValidator extends \Adviser\Validators\AbstractValidator
{

    /**
     * @return \Adviser\Output\MessageBag
     */
    public function handle()
    {
        // @todo
    }
}
```

### Creating a Formatter

[](#creating-a-formatter)

```
use Adviser\Output\MessageBag;

class YourFormatter extends \Adviser\Output\Formatters\AbstractFormatter
{

    /**
     * @param MessageBag $bag
     * @return string
     */
    public function format(MessageBag $bag)
    {
        // @todo
    }
}
```

Contributing
------------

[](#contributing)

1. Fork the project and create a local clone of it.
2. Install the dependencies: `composer update` or `composer install --dev`.
3. Make a fix.
4. Run the tests: `make tests`.

[![](https://camo.githubusercontent.com/aa630fe01fb82d050c70224d46b03f3d23ef07ff6fe18d86e136fafb025ef994/687474703a2f2f692e696d6775722e636f6d2f75326f66794c632e706e67)](https://camo.githubusercontent.com/aa630fe01fb82d050c70224d46b03f3d23ef07ff6fe18d86e136fafb025ef994/687474703a2f2f692e696d6775722e636f6d2f75326f66794c632e706e67)

5. Build the coverage report:

```
make code-coverage
make boot-server
```

Now open `localhost:8000` in your browser. [![](https://camo.githubusercontent.com/4affbfc3b96369f8226f949f1304c82bef617f2497cec196ea8a29f589231766/687474703a2f2f692e696d6775722e636f6d2f316e50553555752e706e67)](https://camo.githubusercontent.com/4affbfc3b96369f8226f949f1304c82bef617f2497cec196ea8a29f589231766/687474703a2f2f692e696d6775722e636f6d2f316e50553555752e706e67)

6. Commit and pull!

### Extra: building the documentation (ApiGen is required)

[](#extra-building-the-documentation-apigen-is-required)

```
apigen --version
make build-docs boot-docs-server
```

Additional information
----------------------

[](#additional-information)

License and support information, as well as my thanks to everyone who made *Adviser* possible.

### License

[](#license)

This project is licensed under *the MIT license*.

### Support

[](#support)

Stuck? Found a bug? Feel free to create a new issue here on *Github*, or find me on [Twitter](https://twitter.com/bound1ess).

### Thanks!

[](#thanks)

To the creators of *PHPUnit*, *Symfony*, *Guzzle*, *Mockery* and *Box* projects.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% 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

Every ~3 days

Total

17

Last Release

4125d ago

Major Versions

0.2.0 → 1.0.02015-01-30

0.1.3 → 1.0.82015-02-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/270a6b451bb75c99beae25836d16453daf58531cfac6baecd8d0a72059baa44b?d=identicon)[bound1ess](/maintainers/bound1ess)

---

Top Contributors

[![bound1ess](https://avatars.githubusercontent.com/u/10074992?v=4)](https://github.com/bound1ess "bound1ess (190 commits)")[![mazurva](https://avatars.githubusercontent.com/u/1152567?v=4)](https://github.com/mazurva "mazurva (1 commits)")

---

Tags

cliapplicationsuggestimprovementspossible

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bound1ess-adviser/health.svg)

```
[![Health](https://phpackages.com/badges/bound1ess-adviser/health.svg)](https://phpackages.com/packages/bound1ess-adviser)
```

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M418](/packages/drupal-core-recommended)[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M568](/packages/shopware-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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