Need help with phpstan-deprecation-rules?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

phpstan
185 Stars 8 Forks 77 Commits 7 Opened issues

Description

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

Services available

!
?

Need anything else?

Contributors list

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 {}

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.