---
title: "lint/refactor/rename-function"
pagination: false
---

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

<RuleId id="lint/refactor/rename-function" />

Not in any preset. In Rector's [`rector-laravel/laravel-100`](/docs/rules/sets/rector-laravel/laravel-100), [`rector-laravel/up-to-laravel-100`](/docs/rules/sets/rector-laravel/up-to-laravel-100), [`rector-laravel/up-to-laravel-110`](/docs/rules/sets/rector-laravel/up-to-laravel-110), [`rector-laravel/up-to-laravel-120`](/docs/rules/sets/rector-laravel/up-to-laravel-120), [`rector-laravel/up-to-laravel-130`](/docs/rules/sets/rector-laravel/up-to-laravel-130), [`rector-laravel/up-to-laravel-130-without-attributes`](/docs/rules/sets/rector-laravel/up-to-laravel-130-without-attributes), [`rector/code-quality`](/docs/rules/sets/rector/code-quality), [`rector/php54`](/docs/rules/sets/rector/php54), [`rector/php56`](/docs/rules/sets/rector/php56), [`rector/php72`](/docs/rules/sets/rector/php72), [`rector/php73`](/docs/rules/sets/rector/php73), [`rector/php74`](/docs/rules/sets/rector/php74), [`rector/php80`](/docs/rules/sets/rector/php80), [`rector/php85`](/docs/rules/sets/rector/php85), [`rector/php86`](/docs/rules/sets/rector/php86) sets. Unsafe fix: it can change behavior.

## What it does

Turn defined function call new one

## Configuration

```toml title="pun.toml"
[lint.rules]
"refactor/rename-function" = "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

- [`RenameFunction`](https://getrector.com/rule-detail/rename-function-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)
