---
title: "analyse/deprecated/method"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="analyse/deprecated/method" />

In the [`analyse-recommended`](/docs/rules/presets/analyse-recommended) preset and every stricter one. Report only.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"deprecated/method" = "on"
```

To skip it in some files or lines, add an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`RestrictedDeprecatedMethodUsageExtension`](https://github.com/phpstan/phpstan-deprecation-rules#readme) (phpstan-classes)
- [`DeprecatedMethod`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`method.deprecated`](https://phpstan.org/error-identifiers/method.deprecated) (phpstan-deprecation-rules)
- [`staticMethod.deprecated`](https://phpstan.org/error-identifiers/staticMethod.deprecated) (phpstan-deprecation-rules)

[More analyse/deprecated rules](/docs/rules/analyse/deprecated) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
