---
title: "lint/refactor/rename-class-constant"
pagination: false
---

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

<RuleId id="lint/refactor/rename-class-constant" />

Not in any preset. In Rector's [`rector/php85`](/docs/rules/sets/rector/php85) set. Unsafe fix: it can change behavior.

## What it does

Replace defined class constants in their calls

## Configuration

```toml title="pun.toml"
[lint.rules]
"refactor/rename-class-constant" = "error"
```

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

## Replaces

- [`RenameClassConstFetch`](https://getrector.com/rule-detail/rename-class-const-fetch-rector) (rector)

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