rector/packages/DeprecationExtractor
2017-12-02 13:55:22 +01:00
..
2017-12-02 13:55:22 +01:00
2017-11-25 02:36:43 +01:00
2017-10-10 13:34:04 +02:00

Deprecation Extractor

This package extracts 2 cases:

  • @deprecate annotation
  • trigger_error(*, E_USER_DEPRECATED) from the code.

It helps to generated automate rectors and identify BC changes purely from the code.

How it works?

  1. Just read the message or node

  2. Guess what rector might change the code

  3. Create RectorGuess class that holds rector suggetion

    • suggested rector class
    • certainity of the guess (from 0 to 100)
    • related node
    • related message (only for @deprecate)
  4. Show it in console table

How it helps you?

Instead of using your eyes and brain to read CHANGELOG.md or UPGRADE-x.md, just run it over directory of framework you use:

vendor/bin/rector extract-deprecations vendor/nette/application/src

It will show you what changed and how.