---
title: "Coming from mago"
pagination: false
---

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

## Config translation

`pun migrate` keeps the old config and reports what it skips. Planned rules do not run.

`pun migrate` does not translate `mago.toml` yet. It reports the file as unsupported and leaves it alone. Pick the Pun rules by hand from the table.

| Mago config | Manual Pun equivalent |
| --- | --- |
| Formatter settings | A `[format] preset` and explicit layout rules. Mago's style is not a Pint preset |
| Linter rule codes | Linked `[lint.rules]` or `[format.rules]` entries |
| Analyzer issue codes | Linked analyse rule IDs, sometimes several per code |
| Exclusions | `[files] exclude`, or exclusions under the matching command |

Analyzer links go to Mago's analyzer overview, because Mago 1.57 has no page per code. `Pun/*` names are Pun's Mago ports, not Mago rule codes.

## Rule mapping

<MigrationTable tool="mago" />

## Unsupported rules

### Mago formatter pragmas; Pun reports unused @pun-ignore itself (lint/comments/no-unused-ignore)

[`ineffective-format-ignore-next`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#ineffective-format-ignore-next), [`ineffective-format-ignore-region`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#ineffective-format-ignore-region).

### Psl integration: out of scope (Laravel-first)

[`psl-array-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-array-functions), [`psl-data-structures`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-data-structures), [`psl-datetime`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-datetime), [`psl-math-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-math-functions), [`psl-output`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-output), [`psl-randomness-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-randomness-functions), [`psl-regex-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-regex-functions), [`psl-sleep-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-sleep-functions), [`psl-string-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#psl-string-functions).

### Symfony integration: out of scope (Laravel-first)

[`no-service-state-mutation`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-service-state-mutation), [`prefer-interface`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#prefer-interface).

### WordPress integration: out of scope (Laravel-first)

[`no-db-schema-change`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-db-schema-change), [`no-direct-db-query`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-direct-db-query), [`no-roles-as-capabilities`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-roles-as-capabilities), [`no-unescaped-output`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-unescaped-output), [`nonce-verification`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#nonce-verification), [`prepared-sql`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#prepared-sql), [`use-wp-functions`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#use-wp-functions), [`validated-sanitized-input`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#validated-sanitized-input).

### no PHPStan-parity equivalent; Mago analyzer is not a migrate input

[`AlwaysMatchingSwitchCase`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`AmbiguousClassLikeConstantAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`AmbiguousInstantiationTarget`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`AmbiguousObjectMethodAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`AmbiguousObjectPropertyAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ArrayAppendOverflow`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ArrayToIntCast`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ArrayToStringConversion`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`AssignmentToConstant`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`AvoidCatchingError`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`BackedPropertyReferenceHook`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ClassMustBeFinal`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`CloneInsideLoop`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ConditionIsTooComplex`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ConflictingReferenceConstraint`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ConflictingTemplateEqualityBounds`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`DeprecatedClosure`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`DeprecatedFeature`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`DeprecatedTrait`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`DirectTraitConstantAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`DocblockParameterNarrowing`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`DuplicateSwitchCase`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`EmptyMatchExpression`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`EnumIteration`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ExcessTemplateParameter`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ExperimentalUsage`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ExpressionIsTooComplex`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`FalseOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`GenericObjectIteration`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`HiddenGeneratorReturn`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImplicitFloatToIntCast`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImplicitResourceToStringCast`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImplicitToStringCast`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImpossibleArrayAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImpossibleArrayAssignment`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImpossibleAssignment`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImpossibleKeyCheck`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImpossibleNonnullEntryCheck`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ImpreciseType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`IncompatibleConstantAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`IncompatiblePropertyHookSignature`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`IncompatibleTemplateLowerBound`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InconsistentTemplate`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidArrayAccessAssignmentValue`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidArrayElement`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidClassConstantOnString`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidClassStringExpression`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidConstantAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidConstantSelector`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidDestructuringSource`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidForeachKey`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidForeachValue`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidGlobal`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidIssetExpression`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidMemberSelector`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidParentType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidPropertyRead`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidScopeKeywordContext`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidStaticMethodAccess`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidTemplateParameter`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`InvalidTraitAliasModifier`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`LessSpecificNestedArgumentType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`LessSpecificNestedReturnStatement`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ListDestructureNegativeKey`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ListDestructureStringKey`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ListUsedInReadContext`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MatchDefaultArmAlwaysExecuted`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MatchExpressionOnlyDefaultArm`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MatchSubjectTypeIsNever`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MismatchedArrayIndex`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MissingApiOrInternal`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MissingConstantType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MissingMagicMethod`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MissingTemplateParameter`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MixedArrayAssignment`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MixedAssignment`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MixedClone`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MixedDestructuringShape`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`MixedOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NamedArgumentAfterPositional`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NeverMatchingSwitchCase`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NoValidCatchTypeFound`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NoValue`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NonDocumentedConstant`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NonDocumentedMethod`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NonDocumentedProperty`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NonExistentUseImport`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NonStaticAbstractImplementation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NullDestructuringSource`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`NullOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`OverrideFinalPropertyHook`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ParadoxicalCondition`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyArrayAppendOverflow`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyFalseOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyInvalidClone`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyInvalidOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyNullDestructuringSource`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyNullOperand`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`PossiblyStaticAccessOnInterface`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`RedundantComparison`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`RedundantDocblockType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`RedundantKeyCheck`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`RedundantLogicalOperation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`RedundantNonnullEntryCheck`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ReferenceConstraintViolation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`ReferenceReusedFromConfusingScope`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`SideEffectsInCondition`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`SkipInKeyedDestructuring`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`SpreadInDestructuring`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`StaticAccessOnInterface`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`StringConstantSelector`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`StringMemberSelector`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`TemplateConstraintViolation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`TraitConstantOverride`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`TypeConfirmation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableClassConstant`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableClassLike`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableConstant`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableEnumCase`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableFunction`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableMethod`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnavailableProperty`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnimplementedAbstractPropertyHook`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnknownClassInstantiation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnknownConstantSelectorType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnknownIteratorType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnknownMatchSubjectType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnknownMemberSelectorType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnknownYieldFromIteratorType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnresolvableClassConstant`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnusedParameter`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UnusedTemplateParameter`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`UselessControlFlow`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/), [`WhereConstraintViolation`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/).

## Pun-only rules

- [`lint/comments/no-unused-ignore`](/docs/rules/lint/comments/no-unused-ignore)
