Skip to content

rnuernberg/deprecation-detector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SensioLabs DeprecationDetector

The SensioLabs DeprecationDetector runs a static code analysis against your project's source code to find usages of deprecated methods, classes and interfaces. For Symfony2 projects, it also detects usages of deprecated services.

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 Symfony2 console component. It makes heavy use of the PHP-Parser library for analyzing PHP code.

The command works in two steps:

  1. Scanning your vendor libraries for defined deprecations and cache them as a ruleset
  2. Finding usages of those deprecations from your ruleset.

Installation

Standalone installation

Clone the repository

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

Run composer

$ composer install

Create phar archive with Box (optional)

$ box build

If you want to call the deprecation-detector globally, it needs to be placed in your PATH. For example with:

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

Usage

Assuming you are in a Symfony2 project, simply run:

$ deprecation-detector check

(The check command name can be ommitted, if you do not provide arguments or options.)

To use the DeprecationDetector in a non-Symfony2 project, you need to provide the source and the ruleset arguments

$ deprecation-detector check src/ composer.json

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

$ deprecation-detector check --help

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%