Skip to content
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 0

PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.

Notifications You must be signed in to change notification settings

staabm/phpstan-deprecation-rules

This branch is 41 commits ahead of, 89 commits behind phpstan/phpstan-deprecation-rules:2.0.x.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

867e2a5 Â· May 9, 2021
Apr 30, 2021
Dec 13, 2020
May 9, 2021
May 9, 2021
Jun 24, 2018
Jun 24, 2018
Jun 24, 2018
Dec 13, 2020
Dec 13, 2020
Dec 13, 2020
Dec 13, 2020
Nov 25, 2019
May 9, 2021

Repository files navigation

Rules for detecting usage of deprecated classes, methods, properties, constants and traits.

Build Latest Stable Version License

Installation

To use this extension, require it in Composer:

composer require --dev phpstan/phpstan-deprecation-rules

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include rules.neon in your project's PHPStan config:

includes:
    - vendor/phpstan/phpstan-deprecation-rules/rules.neon

Deprecating code you don't own

This extension emits deprecation warnings on code, which uses properties/functions/methods/classes which are annotated as @deprecated.

In case you don't own the code which you want to be considered deprecated, use PHPStan Stub Files to declare deprecations for vendor files like:

/** @deprecated */
class ThirdPartyClass {}

About

PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.

Resources

Stars

Watchers

Forks

Sponsor this project

Sponsor

Packages

No packages published

Languages

  • PHP 99.3%
  • Makefile 0.7%