PHPackages                             mds-agenturgruppe/php-code-checker - 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. mds-agenturgruppe/php-code-checker

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

mds-agenturgruppe/php-code-checker
==================================

CLI tool for running PHP 8.x code checks

v5.0.0(10mo ago)06.1k↓45.5%12BSD-3-ClausePHPPHP &gt;= 8.0

Since Jun 8Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/mds-agenturgruppe/php-code-checker)[ Packagist](https://packagist.org/packages/mds-agenturgruppe/php-code-checker)[ RSS](/packages/mds-agenturgruppe-php-code-checker/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelogDependencies (7)Versions (19)Used By (2)

mds PHP Code Checker
====================

[](#mds-php-code-checker)

`mds-code-check` is a CLI tool for running PHP 8.x code checks for Symfony based applications with configurable rule sets with:

- [PHPStan](https://phpstan.org/)
    - [PHPStan Symfony Framework](https://github.com/phpstan/phpstan-symfony)
    - [PHPStan Rules](https://github.com/symplify/phpstan-rules)
    - [Rules for detecting deprecations](https://github.com/phpstan/phpstan-deprecation-rules)
- [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer)
- [PHPMD](https://github.com/phpmd/phpmd)
- [Rector](https://getrector.com/)

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

[](#installation)

```
composer require --dev mds-agenturgruppe/php-code-checker:^5.0

```

Getting Started
---------------

[](#getting-started)

After installation run this command:

```
vendor/bin/mds-code-check

```

This will execute code checks with the default ruleset, which is intended for code checks of Symfony projects.

Configuring rule sets
---------------------

[](#configuring-rule-sets)

### Rule sets

[](#rule-sets)

Rule sets define which checks and the arguments are used for a project when running the `mds-code-check` script. By default [`rulesets/default/ruleset.conf`](rulesets/default/ruleset.conf) is used.

#### Configuration variables

[](#configuration-variables)

Ruleset files define variables to configure the executed checks.

- Enable (`1`) or disable (`0`) checks:
    - `PHPSTAN`, `PHPCS`, `PHPMD`
- Arguments for each check:
    - `PHPSTAN_ARGS`, `PHPCS_ARGS`, `PHPMD_ARGS`

Project configuration
---------------------

[](#project-configuration)

`mds-code-check` can be adapted to project-specific needs.

### Used ruleset

[](#used-ruleset)

The used ruleset is configured by placing `.mds-code-checker.conf` into the project root folder defining the `RULESET` variable with the ruleset file to use.

```
RULESET="./vendor/mds-agenturgruppe/php-code-checker/rulesets/default/ruleset.conf";

```

### Adapting ruleset

[](#adapting-ruleset)

In the project configuration file `.mds-code-checker.conf` the used ruleset can be adjusted as needed by overwriting the defining variables.

Example for disabling checks and changing arguments:

```
RULESET="./vendor/mds-agenturgruppe/php-code-checker/rulesets/default/ruleset.conf";
PHPSTAN_ARGS="--level=9 analyse bundles"
PHPCS_ARGS="--extensions=php --standard=./src/project-phpcs-ruleset.xml ./src -s"
PHPMD_ARGS="./src text --standard=./src/project-phpmp-ruleset.xml --exclude=\"*/Resources/views/*\""

```

`mds-code-check` arguments
--------------------------

[](#mds-code-check-arguments)

In the development or analysis process, it is sometimes useful to only execute some tests. This can be achieved by passing check names as arguments to `mds-code-check`.

Only execute phpstan:

```
vendor/bin/mds-code-check phpstan

```

Only execute PHP\_CodeSniffer and phpmd:

```
vendor/bin/mds-code-check phpcs phpmd

```

CI pipeline integration
-----------------------

[](#ci-pipeline-integration)

For usage in CI pipelines and failing code check stages `mds-code-check` returns exit code `1` if at least one of the executed check script returns exit code `1`. If all checks are successful exit code `0` is returned.

PHPStan
=======

[](#phpstan)

Find use of deprecations
------------------------

[](#find-use-of-deprecations)

To find usage of deprecated sources add to the project `phpstan.neon` file:

```
vendor/phpstan/phpstan-deprecation-rules/rules.neon

```

Rector
======

[](#rector)

To run rector with our default config execute

```
vendor/bin/mds-rector

```

This will use config `rulesets/default/rector-default.php` and the `dry-run` option.

*Tip:* For a better overview of the dry-run output forward this to e.g. `> rector-run.diff` file and open that in sublime.

```
vendor/bin/mds-rector --dry-run > rector-run.diff

```

Use the option `--force-run` to apply all the changes.

```
vendor/bin/mds-rector --force-run

```

Custom Config
-------------

[](#custom-config)

To use a custom config for your project, you can copy `rulesets/default/rector-default.php` to `PROJECT_DIR/rector.php` and adjust that to your needs.

Then use the standard rector cli command.

```
vendor/bin/rector process --dry-run

```

For more information check:

Migration to v5.x
=================

[](#migration-to-v5x)

PHPStan
-------

[](#phpstan-1)

- If you use PhpStorm and want a one-time change, use the Replace function with regex activated so that you replace `@SuppressWarnings\(([^"\)]+)\)` with `@SuppressWarnings("$1")`.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance74

Regular maintenance activity

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~117 days

Recently: every ~201 days

Total

19

Last Release

55d ago

Major Versions

v1.1.0 → v2.0.02022-05-30

v1.2.0 → v3.0.02023-11-16

v2.2.0 → v3.2.02024-01-10

2.x-dev → 4.x-dev2025-06-24

v4.0.0 → v5.0.02025-07-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/721baa465f0ca501d1e388c39a2c653a5f7e15b269b858b4fb976d927b76efb1?d=identicon)[mds-agenturgruppe](/maintainers/mds-agenturgruppe)

---

Top Contributors

[![fkipping](https://avatars.githubusercontent.com/u/66619383?v=4)](https://github.com/fkipping "fkipping (18 commits)")[![hadl](https://avatars.githubusercontent.com/u/3617107?v=4)](https://github.com/hadl "hadl (3 commits)")

---

Tags

devstatic analysis

### Embed Badge

![Health badge](/badges/mds-agenturgruppe-php-code-checker/health.svg)

```
[![Health](https://phpackages.com/badges/mds-agenturgruppe-php-code-checker/health.svg)](https://phpackages.com/packages/mds-agenturgruppe-php-code-checker)
```

###  Alternatives

[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1862.1M27](/packages/dereuromark-cakephp-ide-helper)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M263](/packages/ssch-typo3-rector)[chromatic/usher

A collection of Robo commands for use on Chromatic projects.

13534.3k1](/packages/chromatic-usher)[savinmikhail/add_named_arguments_rector

Rector rule to add names to arguments for functions'/methods' calls

1969.5k3](/packages/savinmikhail-add-named-arguments-rector)[mrpunyapal/rector-pest

Rector upgrade rules for Pest - refactoring and best practices for Pest testing framework

4717.6k18](/packages/mrpunyapal-rector-pest)

PHPackages © 2026

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