---
title: "lint/style/require-final-class"
pagination: false
---

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

<RuleId id="lint/style/require-final-class" />

Not in any set. Unsafe fix: it can change behaviour.

## What it does

All classes must be final, except abstract ones and Doctrine entities.

## Configuration

```toml title="pun.toml"
[lint.rules]
"style/require-final-class" = "error"
```

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

## Replaces

- [`final_class`](https://cs.symfony.com/doc/rules/class_notation/final_class.html) (php-cs-fixer, risky)

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