Download the PHP package sensiolabs-de/deprecation-detector without Composer
On this page you can find all versions of the php package sensiolabs-de/deprecation-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sensiolabs-de/deprecation-detector
More information about sensiolabs-de/deprecation-detector
Files in sensiolabs-de/deprecation-detector
Package deprecation-detector
Short Description Command line tool to detect usage of deprecated code
License MIT
Informations about the package deprecation-detector
SensioLabs DeprecationDetector
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
Please note this tool is in a very early stage of development. Expect bugs and quirks.
Basic knowledge
The Sensiolabs DeprecationDetector is a command line command based on the Symfony Console component. It makes heavy use of the PHP-Parser library for analyzing PHP code.
The command works in three steps:
- Scanning your vendor libraries for defined deprecations and cache them as a
ruleset
- Finding usages of those deprecations from your ruleset.
- Output with the affected code parts.
Installation
Composer
For a system-wide installation via Composer, you can run:
Make sure you have ~/.composer/vendor/bin/
in your PATH
and you will be able to call the deprecation-detector
command.
PHAR
You can download the PHAR file available on the releases page:
Standalone
Clone the repository
Run composer
Create phar archive with Box (optional)
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:
Otherwise you can call bin/deprecation-detector
directly.
Usage
To use the DeprecationDetector you need to provide the source
and the ruleset
arguments
Output
There are different output formats available, by default the output is printed in the commandline.
Html
You can get a list of all options and arguments by running
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
.
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.
This will exclude all deprecated calls to MyClass::method and Foo::bar.
Contribution
Currently, the SensioLabs DeprecationDetector is in a very early state. Pull requests are welcome!
Maintainers
The DeprecationDetector is a project developed by the team at SensioLabs Deutschland, maintained by @marvin_klemp.
All versions of deprecation-detector with dependencies
nikic/php-parser Version ^1.3
symfony/console Version ^2.6 || ^3.0
symfony/finder Version ^2.6 || ^3.0
phpdocumentor/reflection-docblock Version ~2.0
symfony/stopwatch Version ^2.7 || ^3.0
symfony/filesystem Version ^2.7 || ^3.0
symfony/dependency-injection Version ^2.7 || ^3.0
symfony/config Version ^2.7 || ^3.0
symfony/expression-language Version ^2.7 || ^3.0