PHPackages                             sensiolabs-de/deprecation-detector - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. sensiolabs-de/deprecation-detector

AbandonedArchivedApplication[Debugging &amp; Profiling](/categories/debugging)

sensiolabs-de/deprecation-detector
==================================

Command line tool to detect usage of deprecated code

0.1.0-alpha4(10y ago)390564.6k↑179.8%41[33 issues](https://github.com/sensiolabs-de/deprecation-detector/issues)[8 PRs](https://github.com/sensiolabs-de/deprecation-detector/pulls)MITPHPPHP &gt;=5.3.9

Since Oct 21Pushed 5y ago2 watchersCompare

[ Source](https://github.com/sensiolabs-de/deprecation-detector)[ Packagist](https://packagist.org/packages/sensiolabs-de/deprecation-detector)[ RSS](/packages/sensiolabs-de-deprecation-detector/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (11)Versions (6)Used By (0)

SensioLabs DeprecationDetector
==============================

[](#sensiolabs-deprecationdetector)

[![Tests](https://github.com/sensiolabs-de/deprecation-detector/workflows/Tests/badge.svg)](https://github.com/sensiolabs-de/deprecation-detector/workflows/Tests/badge.svg)[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/sensiolabs-de/deprecation-detector?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

**CAUTION**: This package is abandoned and will no longer receive any updates.

The SensioLabs DeprecationDetector runs a static code analysis against your project's source code to find usages of deprecated methods, classes and interfaces. For Symfony projects, it also detects usages of deprecated services. It identifies the use of deprecated code thanks to the `@deprecated` annotation.

### Disclaimer

[](#disclaimer)

**Please note this tool is in a very early stage of development. Expect bugs and quirks.**

Basic knowledge
---------------

[](#basic-knowledge)

The Sensiolabs DeprecationDetector is a command line command based on the [Symfony Console component](https://github.com/symfony/Console). It makes heavy use of the [PHP-Parser](https://github.com/nikic/PHP-Parser) library for analyzing PHP code.

The command works in three steps:

1. Scanning your vendor libraries for defined deprecations and cache them as a `ruleset`
2. Finding usages of those deprecations from your ruleset.
3. Output with the affected code parts.

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

[](#installation)

### Composer

[](#composer)

For a system-wide installation via Composer, you can run:

```
$ composer global require sensiolabs-de/deprecation-detector
```

Make sure you have `~/.composer/vendor/bin/` in your `PATH` and you will be able to call the `deprecation-detector` command.

### PHAR

[](#phar)

You can download the PHAR file available on the [releases page](https://github.com/sensiolabs-de/deprecation-detector/releases):

```
curl -OL https://github.com/sensiolabs-de/deprecation-detector/releases/download/0.1.0-alpha4/deprecation-detector.phar
php deprecation-detector.phar

```

### Standalone

[](#standalone)

Clone the repository

```
$ git clone git@github.com:sensiolabs-de/deprecation-detector.git
```

Run composer

```
$ composer install
```

Create phar archive with [Box](http://box-project.github.io/box2/) (optional)

```
$ box build
```

Provided you created the phar archive, if you want to call the deprecation-detector globally, it needs to be placed in your `PATH`. For example with:

```
$ chmod a+x deprecation-detector.phar
$ mv deprecation-detector.phar /usr/local/bin/deprecation-detector
```

Otherwise you can call `bin/deprecation-detector` directly.

Usage
-----

[](#usage)

To use the DeprecationDetector you need to provide the `source` and the `ruleset` arguments

```
$ deprecation-detector check src/ vendor/
$ deprecation-detector check src/ composer.lock
$ deprecation-detector check src/ .rules/some_generated_rule_set
```

### Output

[](#output)

There are different output formats available, by default the output is printed in the commandline.

#### Html

[](#html)

```
$ deprecation-detector check src/ vendor/ --log-html deprecationlog.html
```

You can get a list of all options and arguments by running

```
$ deprecation-detector check --help
```

The default output might not fit into the cli. If that is the case you can set the output to a list by setting `--output=simple`.

```
$ deprecation-detector check src/ vendor/ --output=simple
```

Excluding deprecated method calls
---------------------------------

[](#excluding-deprecated-method-calls)

You can exclude deprecated method calls by using the `filter-methods` option. This option takes a comma separated list of method references to exclude.

```
$ deprecation-detector check --filter-methods=MyClass::method,Foo::bar src/ vendor/
```

This will exclude all deprecated calls to MyClass::method and Foo::bar.

Contribution
------------

[](#contribution)

Currently, the SensioLabs DeprecationDetector is in a very early state. Pull requests are welcome!

Maintainers
-----------

[](#maintainers)

The DeprecationDetector is a project developed by the team at [SensioLabs Deutschland](http://sensiolabs.de/), maintained by [@marvin\_klemp](https://twitter.com/marvin_klemp).

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity55

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67% 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 ~25 days

Total

4

Last Release

3823d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6723d09081a649eb93681407fa87f3ca322f62d1e900562f4253411dfc55319?d=identicon)[andreashucks](/maintainers/andreashucks)

---

Top Contributors

[![MarvinKlemp](https://avatars.githubusercontent.com/u/5558190?v=4)](https://github.com/MarvinKlemp "MarvinKlemp (140 commits)")[![datenbrille](https://avatars.githubusercontent.com/u/795463?v=4)](https://github.com/datenbrille "datenbrille (12 commits)")[![DrSchimke](https://avatars.githubusercontent.com/u/3299009?v=4)](https://github.com/DrSchimke "DrSchimke (9 commits)")[![slde-robin](https://avatars.githubusercontent.com/u/7722882?v=4)](https://github.com/slde-robin "slde-robin (8 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (8 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (5 commits)")[![garak](https://avatars.githubusercontent.com/u/179866?v=4)](https://github.com/garak "garak (4 commits)")[![theofidry](https://avatars.githubusercontent.com/u/5175937?v=4)](https://github.com/theofidry "theofidry (3 commits)")[![mikeSimonson](https://avatars.githubusercontent.com/u/907613?v=4)](https://github.com/mikeSimonson "mikeSimonson (2 commits)")[![umulmrum](https://avatars.githubusercontent.com/u/6984809?v=4)](https://github.com/umulmrum "umulmrum (2 commits)")[![chr-hertel](https://avatars.githubusercontent.com/u/2852185?v=4)](https://github.com/chr-hertel "chr-hertel (2 commits)")[![kevintweber](https://avatars.githubusercontent.com/u/1842630?v=4)](https://github.com/kevintweber "kevintweber (2 commits)")[![DavidBadura](https://avatars.githubusercontent.com/u/470138?v=4)](https://github.com/DavidBadura "DavidBadura (2 commits)")[![skug](https://avatars.githubusercontent.com/u/969545?v=4)](https://github.com/skug "skug (2 commits)")[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (2 commits)")[![rnuernberg](https://avatars.githubusercontent.com/u/1104497?v=4)](https://github.com/rnuernberg "rnuernberg (1 commits)")[![klandaika](https://avatars.githubusercontent.com/u/6818055?v=4)](https://github.com/klandaika "klandaika (1 commits)")[![mahone3297](https://avatars.githubusercontent.com/u/1701379?v=4)](https://github.com/mahone3297 "mahone3297 (1 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (1 commits)")[![jcchavezs](https://avatars.githubusercontent.com/u/3075074?v=4)](https://github.com/jcchavezs "jcchavezs (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sensiolabs-de-deprecation-detector/health.svg)

```
[![Health](https://phpackages.com/badges/sensiolabs-de-deprecation-detector/health.svg)](https://phpackages.com/packages/sensiolabs-de-deprecation-detector)
```

###  Alternatives

[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[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)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M519](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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