Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrefixAllGlobals + ValidFunctionName: ignore deprecated methods by design #1806

Merged

Commits on Oct 4, 2019

  1. Sniff: add new is_function_deprecated() utility function

    This new function:
    * Tries to find a function docblock, if it exists.
    * If found, checks if the docblock contains at least one `@deprecated` tag.
    
    Returns boolean true/false.
    
    Note: this method is `static` to allow the `ValidFunctionName` sniff which extends an upstream sniff to use the method as well.
    jrfnl committed Oct 4, 2019
    Configuration menu
    Copy the full SHA
    28bc144 View commit details
    Browse the repository at this point in the history
  2. ValidFunctionName: ignore deprecated functions

    Check the function docblock for a `@deprecated` tag and if found, bow out.
    
    Includes unit tests.
    
    Fixes 1797
    jrfnl committed Oct 4, 2019
    Configuration menu
    Copy the full SHA
    6226cdc View commit details
    Browse the repository at this point in the history
  3. PrefixAllGlobals: ignore deprecated functions

    Check the function docblock for a `@deprecated` tag and if found, bow out.
    
    Includes unit tests.
    
    Fixes 1797
    
    Note: the same should probably also be done for classes/interfaces/traits/constants marked as deprecated, but that's for another PR.
    jrfnl committed Oct 4, 2019
    Configuration menu
    Copy the full SHA
    d5640f8 View commit details
    Browse the repository at this point in the history