---
title: "Coming from rector"
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.

Run `pun migrate --from rector` after `composer install`. It reads `rector.php` through the project's Rector, so it needs system PHP.

| rector.php | pun.toml |
| --- | --- |
| `->withPreparedSets(deadCode: true)` | `[lint] sets = ["rector/dead-code"]`, Rector's set exactly |
| `typeDeclarations: true` | `rector/type-declaration` |
| `->withSets([...])` of Rector, rector-laravel, rector-phpunit or Pest | The `rector/...`, `rector-laravel/...`, `rector-phpunit/...` or `pest/...` set of the same name |
| `->withPhpSets()` | `rector/php-sets`, up to `[php] version` |
| Explicit rules and set differences | `[lint.rules]` at `"error"` or `"off"` |
| `->withConfiguredRule()` | Rule options with kebab-case keys; lists under `items` |
| Some of the Rector rules of one Pun rule, such as `ForeachToArrayFindRector` without the other `ForeachToArray*Rector` rules | The Pun rule with its option that limits it to those rewrites, such as `functions = ["array-find"]` |
| `->withPaths()`, path skips | `[lint] exclude` and `[[lint.overrides]]` |
| Closures, null values, custom rules, excluded sets | Reported and skipped |
| `->withImportNames()`, `->withTreatClassesAsFinal()`, `->withPhpVersion()`, `->withFileExtensions()`, `->withIndent()`, `->withFluentCallNewLine()`, `->withTypeGuardedClasses()` | Reported under "Not migrated": pun.toml has no project-wide equivalent. Lint fixes write class names fully qualified |

Layout-only Rector rules map to format rules. The migration reports any that `[format]` does not run.

## Rule mapping

<MigrationTable tool="rector" />

## Unsupported rules

### Behat rules: out of scope (Laravel-first)

[`TypedStaticPropertyInBehatContext`](https://getrector.com/rule-detail/typed-static-property-in-behat-context-rector).

### Doctrine rules: out of scope (Laravel-first)

[`ChildDoctrineRepositoryClassType`](https://getrector.com/rule-detail/child-doctrine-repository-class-type-rector), [`AddAnnotationToRepository`](https://getrector.com/find-rule), [`AddArrayResultColumnNames`](https://getrector.com/find-rule), [`AddGetReferenceType`](https://getrector.com/find-rule), [`ArrayDimFetchAssignToAddCollectionCall`](https://getrector.com/find-rule), [`ArrayMapOnCollectionToArray`](https://getrector.com/find-rule), [`ArrayMergeOnCollectionToArray`](https://getrector.com/find-rule), [`ArrayOffsetSetToSetCollectionCall`](https://getrector.com/find-rule), [`AssertNullOnCollectionToAssertEmpty`](https://getrector.com/find-rule), [`AssertSameCountOnCollectionToAssertCount`](https://getrector.com/find-rule), [`CastDoctrineExprToString`](https://getrector.com/find-rule), [`ChangeCompositeExpressionAddMultipleWithWith`](https://getrector.com/find-rule), [`CollectionDocblockGenericType`](https://getrector.com/find-rule), [`CollectionGetterNativeType`](https://getrector.com/find-rule), [`CollectionParamTypeSetterToCollectionProperty`](https://getrector.com/find-rule), [`CollectionSetterParamNativeType`](https://getrector.com/find-rule), [`CompleteParamDocblockFromSetterToCollection`](https://getrector.com/find-rule), [`CompletePropertyDocblockFromToMany`](https://getrector.com/find-rule), [`CompleteReturnDocblockFromToMany`](https://getrector.com/find-rule), [`CorrectDefaultTypesOnEntityProperty`](https://getrector.com/find-rule), [`CriteriaOrderingConstantsDeprecation`](https://getrector.com/find-rule), [`CurrentOnCollectionToArray`](https://getrector.com/find-rule), [`DefaultCollectionKey`](https://getrector.com/find-rule), [`EmptyOnCollectionToIsEmptyCall`](https://getrector.com/find-rule), [`EventSubscriberInterfaceToAttribute`](https://getrector.com/find-rule), [`ExecuteQueryParamsToBindValue`](https://getrector.com/find-rule), [`ExtractArrayArgOnQueryBuilderSelect`](https://getrector.com/find-rule), [`GetRepositoryServiceLocatorToRepositoryServiceInjection`](https://getrector.com/find-rule), [`InArrayOnCollectionToContainsCall`](https://getrector.com/find-rule), [`InitializeCollectionInConstructor`](https://getrector.com/find-rule), [`IterateToToIterable`](https://getrector.com/find-rule), [`MigrateQueryBuilderResetQueryPart`](https://getrector.com/find-rule), [`MoveCurrentDateTimeDefaultInEntityToConstructor`](https://getrector.com/find-rule), [`NarrowArrayCollectionToCollection`](https://getrector.com/find-rule), [`NarrowParamUnionToCollection`](https://getrector.com/find-rule), [`NarrowPropertyUnionToCollection`](https://getrector.com/find-rule), [`NarrowReturnUnionToCollection`](https://getrector.com/find-rule), [`RemoveAssertNotNullOnCollection`](https://getrector.com/find-rule), [`RemoveCoalesceAssignOnCollection`](https://getrector.com/find-rule), [`RemoveEmptyTableAttribute`](https://getrector.com/find-rule), [`RemoveIfCollectionIdenticalToNull`](https://getrector.com/find-rule), [`RemoveIfInstanceofCollection`](https://getrector.com/find-rule), [`RemoveIsArrayOnCollection`](https://getrector.com/find-rule), [`RemoveNewArrayCollectionOutsideConstructor`](https://getrector.com/find-rule), [`RemoveNewArrayCollectionWrap`](https://getrector.com/find-rule), [`RemoveNullFromInstantiatedArrayCollectionProperty`](https://getrector.com/find-rule), [`RemoveNullFromNullableCollectionType`](https://getrector.com/find-rule), [`RemoveNullsafeOnCollection`](https://getrector.com/find-rule), [`RemoveUselessIsEmptyAssign`](https://getrector.com/find-rule), [`ReplaceFetchAllMethodCall`](https://getrector.com/find-rule), [`ReplaceLifecycleEventArgsByDedicatedEventArgs`](https://getrector.com/find-rule), [`ReturnArrayToNewArrayCollection`](https://getrector.com/find-rule), [`ReturnCollectionDocblock`](https://getrector.com/find-rule), [`SetArrayToNewCollection`](https://getrector.com/find-rule), [`SetParametersArrayToCollection`](https://getrector.com/find-rule), [`TypeNullableEntityFromDocblock`](https://getrector.com/find-rule), [`TypedPropertyFromColumnType`](https://getrector.com/find-rule), [`TypedPropertyFromToManyRelationType`](https://getrector.com/find-rule), [`TypedPropertyFromToOneRelationType`](https://getrector.com/find-rule), [`YamlToAttributeDoctrineMapping`](https://getrector.com/find-rule).

### JMS rules: out of scope (Laravel-first)

[`ObjectTypedPropertyFromJMSSerializerAttributeType`](https://getrector.com/rule-detail/object-typed-property-from-j-m-s-serializer-attribute-type-rector), [`ScalarTypedPropertyFromJMSSerializerAttributeType`](https://getrector.com/rule-detail/scalar-typed-property-from-j-m-s-serializer-attribute-type-rector).

### Rector post-processor, not a rule: no set registers it

[`DocblockNameImportingPost`](https://getrector.com/find-rule), [`NameImportingPost`](https://getrector.com/find-rule), [`UnusedImportRemovingPost`](https://getrector.com/find-rule).

### Rector-internal post-processing step of RenameClass, not a user rule

[`ClassRenamingPost`](https://getrector.com/find-rule).

### Rector-internal post-processing step of the import feature, not a user rule

[`UseAddingPost`](https://getrector.com/find-rule).

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

[`ReturnTypeFromSymfonySerializer`](https://getrector.com/rule-detail/return-type-from-symfony-serializer-rector), [`AccessTypeAnnotationToAttribute`](https://getrector.com/find-rule), [`AccessorAnnotationToAttribute`](https://getrector.com/find-rule), [`ActionSuffixRemover`](https://getrector.com/find-rule), [`AddFormatArgumentToIsValid`](https://getrector.com/find-rule), [`AddRouteAnnotation`](https://getrector.com/find-rule), [`AddTraitGetterReturnTypeBasedOnSetterRequired`](https://getrector.com/find-rule), [`AddViolationToBuildViolation`](https://getrector.com/find-rule), [`AddVoteArgumentToVoteOnAttribute`](https://getrector.com/find-rule), [`ArgumentValueResolverToValueResolver`](https://getrector.com/find-rule), [`AssertSameResponseCodeWithDebugContents`](https://getrector.com/find-rule), [`AuthorizationCheckerIsGrantedExtractor`](https://getrector.com/find-rule), [`AuthorizationCheckerToAccessDecisionManagerInVoter`](https://getrector.com/find-rule), [`AutowireAttribute`](https://getrector.com/find-rule), [`BinaryFileResponseCreateToNewInstance`](https://getrector.com/find-rule), [`ChangeCollectionTypeOptionNameFromTypeToEntryType`](https://getrector.com/find-rule), [`ChangeStringCollectionOptionToConstant`](https://getrector.com/find-rule), [`CommandConfigureToAttribute`](https://getrector.com/find-rule), [`CommandConstantReturnCode`](https://getrector.com/find-rule), [`CommandDefaultNameAndDescriptionToAsCommandAttribute`](https://getrector.com/find-rule), [`CommandGetByTypeToConstructorInjection`](https://getrector.com/find-rule), [`CommandHelpToAttribute`](https://getrector.com/find-rule), [`CommandPropertyToAttribute`](https://getrector.com/find-rule), [`ConsoleExceptionToErrorEventConstant`](https://getrector.com/find-rule), [`ConsoleExecuteReturnInt`](https://getrector.com/find-rule), [`ConstraintOptionsToNamedArguments`](https://getrector.com/find-rule), [`ConstraintUrlOption`](https://getrector.com/find-rule), [`ConstraintValidatorValidateToValidateInContext`](https://getrector.com/find-rule), [`ContainerBuilderCompileEnvArgument`](https://getrector.com/find-rule), [`ContainerGetNameToTypeInTests`](https://getrector.com/find-rule), [`ContainerInterfaceServiceToServiceContainer`](https://getrector.com/find-rule), [`ControllerGetByTypeToConstructorInjection`](https://getrector.com/find-rule), [`ControllerMethodInjectionToConstructor`](https://getrector.com/find-rule), [`ConvertRenderTemplateShortNotationToBundleSyntax`](https://getrector.com/find-rule), [`DefinitionAliasSetPrivateToSetPublic`](https://getrector.com/find-rule), [`DowngradeSymfonyCommandAttribute`](https://getrector.com/find-rule), [`ErrorNamesPropertyToConstant`](https://getrector.com/find-rule), [`EventDispatcherParentConstruct`](https://getrector.com/find-rule), [`EventListenerToEventSubscriber`](https://getrector.com/find-rule), [`EventSubscriberMethodReturnVoid`](https://getrector.com/find-rule), [`FormBuilderSetDataMapper`](https://getrector.com/find-rule), [`FormIsValid`](https://getrector.com/find-rule), [`FormTypeGetParent`](https://getrector.com/find-rule), [`FormTypeInstanceToClassConst`](https://getrector.com/find-rule), [`FromServicePublicToDefaultsPublic`](https://getrector.com/find-rule), [`GetBySymfonyStringToConstructorInjection`](https://getrector.com/find-rule), [`GetCurrencyBundleMethodCallsToIntl`](https://getrector.com/find-rule), [`GetFiltersToAsTwigFilterAttribute`](https://getrector.com/find-rule), [`GetFunctionsToAsTwigFunctionAttribute`](https://getrector.com/find-rule), [`GetHelperControllerToService`](https://getrector.com/find-rule), [`GetRequest`](https://getrector.com/find-rule), [`GetToConstructorInjection`](https://getrector.com/find-rule), [`InlineClassRoutePrefix`](https://getrector.com/find-rule), [`InvokableCommandInputAttribute`](https://getrector.com/find-rule), [`KernelTestCaseContainerPropertyDeprecation`](https://getrector.com/find-rule), [`LiteralGetToRequestClassConstant`](https://getrector.com/find-rule), [`LoadValidatorMetadataToAnnotation`](https://getrector.com/find-rule), [`LoadValidatorMetadataToAttribute`](https://getrector.com/find-rule), [`LogoutHandlerToLogoutEventSubscriber`](https://getrector.com/find-rule), [`LogoutSuccessHandlerToLogoutEventSubscriber`](https://getrector.com/find-rule), [`MagicClosureTwigExtensionToNativeMethods`](https://getrector.com/find-rule), [`MakeDispatchFirstArgumentEvent`](https://getrector.com/find-rule), [`MaxLengthSymfonyFormOptionToAttr`](https://getrector.com/find-rule), [`MergeMethodAnnotationToRouteAnnotation`](https://getrector.com/find-rule), [`MergeServiceNameType`](https://getrector.com/find-rule), [`MessageHandlerInterfaceToAttribute`](https://getrector.com/find-rule), [`MessageSubscriberInterfaceToAttribute`](https://getrector.com/find-rule), [`OptionName`](https://getrector.com/find-rule), [`ParamAndEnvAttribute`](https://getrector.com/find-rule), [`ParamConverterAttributeToMapEntityAttribute`](https://getrector.com/find-rule), [`ParamTypeFromRouteRequiredRegex`](https://getrector.com/find-rule), [`ParameterBagToAutowireAttribute`](https://getrector.com/find-rule), [`ParameterBagTypedGetMethodCall`](https://getrector.com/find-rule), [`ParseFile`](https://getrector.com/find-rule), [`PropertyAccessorCreationBooleanToFlags`](https://getrector.com/find-rule), [`PropertyPathMapperToDataMapper`](https://getrector.com/find-rule), [`PushRequestToRequestStackConstructor`](https://getrector.com/find-rule), [`ReadOnlyOptionToAttribute`](https://getrector.com/find-rule), [`RedirectToRoute`](https://getrector.com/find-rule), [`ReflectionExtractorEnableMagicCallExtractor`](https://getrector.com/find-rule), [`RemoveConstructorAutowireService`](https://getrector.com/find-rule), [`RemoveDefaultGetBlockPrefix`](https://getrector.com/find-rule), [`RemoveEraseCredentials`](https://getrector.com/find-rule), [`RemoveEraseCredentialsFromAuthenticatorManager`](https://getrector.com/find-rule), [`RemoveServiceFromSensioRoute`](https://getrector.com/find-rule), [`RemoveUnusedRequestParam`](https://getrector.com/find-rule), [`RenameCopyOnWindowsOptionToFollowSymlinks`](https://getrector.com/find-rule), [`ReplaceSensioRouteAnnotationWithSymfony`](https://getrector.com/find-rule), [`RequestIsMain`](https://getrector.com/find-rule), [`ResponseReturnTypeControllerAction`](https://getrector.com/rule-detail/response-return-type-controller-action-rector), [`ResponseStatusCode`](https://getrector.com/find-rule), [`ReturnDirectJsonResponse`](https://getrector.com/find-rule), [`RootNodeTreeBuilder`](https://getrector.com/find-rule), [`RouteCollectionBuilderToRoutingConfigurator`](https://getrector.com/find-rule), [`SecurityAttributeToIsGrantedAttribute`](https://getrector.com/find-rule), [`ServiceArgsToServiceNamedArg`](https://getrector.com/find-rule), [`ServiceSetStringNameToClassName`](https://getrector.com/find-rule), [`ServiceSettersToSettersAutodiscovery`](https://getrector.com/find-rule), [`ServiceTagsToDefaultsAutoconfigure`](https://getrector.com/find-rule), [`SignalableCommandInterfaceReturnType`](https://getrector.com/find-rule), [`SimpleFunctionAndFilter`](https://getrector.com/find-rule), [`SimplifyFormRendering`](https://getrector.com/find-rule), [`SingleConditionSecurityAttributeToIsGranted`](https://getrector.com/find-rule), [`SplitAndSecurityAttributeToIsGranted`](https://getrector.com/find-rule), [`StringCastDebugResponse`](https://getrector.com/find-rule), [`StringFormTypeToClass`](https://getrector.com/find-rule), [`StringToArrayArgumentProcess`](https://getrector.com/find-rule), [`SwiftCreateMessageToNewEmail`](https://getrector.com/find-rule), [`SwiftMessageToEmail`](https://getrector.com/find-rule), [`SwiftSetBodyToHtmlPlainMethodCall`](https://getrector.com/find-rule), [`TemplateAnnotationToThisRender`](https://getrector.com/find-rule), [`TraitGetByTypeToInject`](https://getrector.com/find-rule), [`TwigBundleFilesystemLoaderToTwig`](https://getrector.com/find-rule), [`ValidatorBuilderEnableAnnotationMapping`](https://getrector.com/find-rule), [`VarDumperTestTraitMethodArgs`](https://getrector.com/find-rule), [`WebTestCaseAssertIsSuccessful`](https://getrector.com/find-rule), [`WebTestCaseAssertResponseCode`](https://getrector.com/find-rule).

### deprecated upstream (2.6.1, 2.7.0 (removed), main (removed))

[`NewInInitializer`](https://getrector.com/find-rule).

### deprecated upstream (2.6.1, 2.7.0, main)

[`AddParamArrayDocblockFromDataProvider`](https://getrector.com/find-rule), [`AddReturnArrayDocblockFromDataProviderParam`](https://getrector.com/find-rule), [`AddReturnDocblockDataProvider`](https://getrector.com/find-rule), [`AddReturnDocblockFromMethodCallDocblock`](https://getrector.com/find-rule), [`ArraySpreadInsteadOfArrayMerge`](https://getrector.com/find-rule), [`BinaryOpStandaloneAssignsToDirect`](https://getrector.com/find-rule), [`CountArrayToEmptyArrayComparison`](https://getrector.com/find-rule), [`EncapsedStringsToSprintf`](https://getrector.com/find-rule), [`EnumCaseToPascalCase`](https://getrector.com/find-rule), [`JoinStringConcat`](https://getrector.com/find-rule), [`NestedTernaryToMatch`](https://getrector.com/find-rule), [`NullableCompareToNull`](https://getrector.com/find-rule), [`RemoveTypedPropertyNonMockDocblock`](https://getrector.com/find-rule), [`SimplifyRegexPattern`](https://getrector.com/find-rule), [`StaticArrowFunction`](https://getrector.com/find-rule), [`StaticCallOnNonStaticToInstanceCall`](https://getrector.com/find-rule), [`StaticClosure`](https://getrector.com/find-rule), [`StrictStringParamConcat`](https://getrector.com/find-rule), [`SwitchTrueToIf`](https://getrector.com/find-rule), [`UnusedForeachValueToArrayKeys`](https://getrector.com/find-rule), [`WrapEncapsedVariableInCurlyBraces`](https://getrector.com/find-rule).

### deprecated upstream (2.6.1, main)

[`BehatPHPUnitAssertToWebmozart`](https://getrector.com/find-rule), [`ReplaceTestFunctionPrefixWithAttribute`](https://getrector.com/find-rule), [`WillReturnCallbackFallbackToThrow`](https://getrector.com/find-rule).

### deprecated upstream (2.7.0 (removed), main (removed))

[`RenameDeprecatedMethodCall`](https://getrector.com/find-rule), [`UtilsJsonStaticCallNamedArg`](https://getrector.com/find-rule).

### deprecated upstream (2.7.0, main)

[`AddAssertArrayFromClassMethodDocblock`](https://getrector.com/find-rule), [`AddInterfaceByTrait`](https://getrector.com/find-rule), [`AddParamArrayDocblockBasedOnArrayMap`](https://getrector.com/find-rule), [`AddReturnArrayDocblockBasedOnArrayMap`](https://getrector.com/find-rule), [`AddReturnDocblockForDimFetchArrayFromAssigns`](https://getrector.com/find-rule), [`AddSensitiveParameterAttribute`](https://getrector.com/find-rule), [`ChangeNestedForeachIfsToEarlyContinue`](https://getrector.com/find-rule), [`ChangeNestedIfsToEarlyReturn`](https://getrector.com/find-rule), [`ChangeOrIfContinueToMultiContinue`](https://getrector.com/find-rule), [`CoalesceToTernary`](https://getrector.com/find-rule), [`CombineIf`](https://getrector.com/find-rule), [`ConstAndTraitDeprecatedAttribute`](https://getrector.com/find-rule), [`DeprecatedAnnotationToDeprecatedAttribute`](https://getrector.com/find-rule), [`DisallowedEmptyRuleFixer`](https://getrector.com/find-rule), [`DynamicDocBlockPropertyToNativeProperty`](https://getrector.com/find-rule), [`ExplicitBoolCompare`](https://getrector.com/find-rule), [`FluentSettersToStandaloneCallMethod`](https://getrector.com/find-rule), [`FuncCallToMethodCall`](https://getrector.com/find-rule), [`JsonThrowOnError`](https://getrector.com/find-rule), [`ListSwapArrayOrder`](https://getrector.com/find-rule), [`NestedFuncCallsToPipeOperator`](https://getrector.com/find-rule), [`PropertyHook`](https://getrector.com/find-rule), [`RemoveAnnotation`](https://getrector.com/find-rule), [`RemoveReturnThisFromSetterClassMethod`](https://getrector.com/find-rule), [`ReturnBinaryOrToEarlyReturn`](https://getrector.com/find-rule), [`ScalarValueToConstFetch`](https://getrector.com/find-rule), [`SequentialAssignmentsToPipeOperator`](https://getrector.com/find-rule), [`ShortenElseIf`](https://getrector.com/find-rule), [`SimplifyIfElseToTernary`](https://getrector.com/find-rule), [`SwitchNegatedTernary`](https://getrector.com/find-rule).

### deprecated upstream (2.8.4, main)

[`AddOverrideAttributeToOverriddenMethods`](https://getrector.com/find-rule), [`AddParamStringTypeFromSprintfUse`](https://getrector.com/find-rule), [`AddPropertyTypeDeclaration`](https://getrector.com/find-rule), [`ArrayDimFetchToMethodCall`](https://getrector.com/find-rule), [`BinaryOpNullableToInstanceof`](https://getrector.com/find-rule), [`ChangeConstantVisibility`](https://getrector.com/find-rule), [`CompleteDynamicProperties`](https://getrector.com/find-rule), [`ConstFetchToClassConstFetch`](https://getrector.com/find-rule), [`FuncCallToNew`](https://getrector.com/rule-detail/func-call-to-new-rector), [`FuncCallToStaticCall`](https://getrector.com/rule-detail/func-call-to-static-call-rector), [`FunctionArgumentDefaultValueReplacer`](https://getrector.com/find-rule), [`MergeInterfaces`](https://getrector.com/find-rule), [`MethodCallToFuncCall`](https://getrector.com/find-rule), [`MethodCallToStaticCall`](https://getrector.com/find-rule), [`NewToStaticCall`](https://getrector.com/find-rule), [`ParamTypeByParentCallType`](https://getrector.com/find-rule), [`RemoveMethodCallParam`](https://getrector.com/find-rule), [`RemoveParentDelegatingConstructor`](https://getrector.com/find-rule), [`RemoveTraitUse`](https://getrector.com/rule-detail/remove-trait-use-rector), [`RenameStaticMethod`](https://getrector.com/rule-detail/rename-static-method-rector), [`ReplaceArgumentDefaultValue`](https://getrector.com/find-rule), [`ReturnEarlyIfVariable`](https://getrector.com/find-rule), [`StaticCallToMethodCall`](https://getrector.com/find-rule), [`StringToClassConstant`](https://getrector.com/find-rule).

### deprecated upstream (2.8.4: RenameAnnotationRector implements DeprecatedInterface and its refactor() throws; no set registers it)

[`RenameAnnotation`](https://getrector.com/find-rule).

### deprecated upstream (main)

[`ArrayParamTypeByMethodCallType`](https://getrector.com/find-rule), [`CallUserFuncWithArrowFunctionToInline`](https://getrector.com/find-rule), [`DeclareStrictTypes`](https://getrector.com/find-rule), [`EmptyOnNullableObjectToInstanceOf`](https://getrector.com/find-rule), [`FlipTypeControlToUseExclusiveType`](https://getrector.com/find-rule), [`ForRepeatedCountToOwnVariable`](https://getrector.com/find-rule), [`ForeachItemsAssignToEmptyArrayToAssign`](https://getrector.com/find-rule), [`InnerFunctionToPrivateMethod`](https://getrector.com/find-rule), [`MoveInnerFunctionToTopLevel`](https://getrector.com/find-rule), [`ObjectExplicitBoolCompare`](https://getrector.com/find-rule), [`ObjectParamTypeByMethodCallType`](https://getrector.com/find-rule), [`ParamTypeByMethodCallType`](https://getrector.com/find-rule), [`PostIncDecToPreIncDec`](https://getrector.com/find-rule), [`RemoveDeadReturn`](https://getrector.com/find-rule), [`RemoveDuplicatedReturnSelfDocblock`](https://getrector.com/find-rule), [`RemoveUselessIsObjectCheck`](https://getrector.com/find-rule), [`RenameForeachValueVariableToMatchExprVariable`](https://getrector.com/find-rule), [`RenameForeachValueVariableToMatchMethodCallReturnType`](https://getrector.com/find-rule), [`RenameParamToMatchType`](https://getrector.com/find-rule), [`RenamePropertyToMatchType`](https://getrector.com/find-rule), [`RenameVariableToMatchMethodCallReturnType`](https://getrector.com/find-rule), [`RenameVariableToMatchNewType`](https://getrector.com/find-rule), [`ScalarParamTypeByMethodCallType`](https://getrector.com/find-rule), [`SetTypeToCast`](https://getrector.com/find-rule), [`SimplifyStrposLower`](https://getrector.com/find-rule), [`SwitchTrueToMatch`](https://getrector.com/find-rule), [`TernaryFalseExpressionToIf`](https://getrector.com/find-rule), [`WhileNullableToInstanceof`](https://getrector.com/find-rule), [`AllowMockObjectsWithoutExpectationsAttribute`](https://getrector.com/find-rule), [`ConfiguredMockEntityToSetterObject`](https://getrector.com/find-rule), [`RemoveNamedArgsInDataProvider`](https://getrector.com/find-rule), [`SuffixMockObjectProperty`](https://getrector.com/find-rule).

### downgrade sets contradict modernize; use [php] version instead

[`AddReturnTypeWillChangeAttribute`](https://getrector.com/find-rule), [`ArrowFunctionToAnonymousFunction`](https://getrector.com/find-rule), [`DowngradeAbstractPrivateMethodInTrait`](https://getrector.com/find-rule), [`DowngradeArbitraryExpressionsSupport`](https://getrector.com/find-rule), [`DowngradeArrayAll`](https://getrector.com/find-rule), [`DowngradeArrayAny`](https://getrector.com/find-rule), [`DowngradeArrayFilterNullableCallback`](https://getrector.com/find-rule), [`DowngradeArrayFind`](https://getrector.com/find-rule), [`DowngradeArrayFindKey`](https://getrector.com/find-rule), [`DowngradeArrayFirstLast`](https://getrector.com/find-rule), [`DowngradeArrayIsList`](https://getrector.com/find-rule), [`DowngradeArrayKeyFirstLast`](https://getrector.com/find-rule), [`DowngradeArrayMergeCallWithoutArguments`](https://getrector.com/find-rule), [`DowngradeArraySpread`](https://getrector.com/find-rule), [`DowngradeAttributeToAnnotation`](https://getrector.com/find-rule), [`DowngradeClamp`](https://getrector.com/find-rule), [`DowngradeClassOnObjectToGetClass`](https://getrector.com/find-rule), [`DowngradeContravariantArgumentType`](https://getrector.com/find-rule), [`DowngradeCovariantReturnType`](https://getrector.com/find-rule), [`DowngradeDereferenceableOperation`](https://getrector.com/find-rule), [`DowngradeDomNodeChildNodesForeach`](https://getrector.com/find-rule), [`DowngradeDynamicClassConstFetch`](https://getrector.com/find-rule), [`DowngradeEnumToConstantListClass`](https://getrector.com/find-rule), [`DowngradeFinalPropertyPromotion`](https://getrector.com/find-rule), [`DowngradeFinalizePublicClassConstant`](https://getrector.com/find-rule), [`DowngradeFirstClassCallableSyntax`](https://getrector.com/find-rule), [`DowngradeFlexibleHeredocSyntax`](https://getrector.com/find-rule), [`DowngradeFreadFwriteFalsyToNegation`](https://getrector.com/find-rule), [`DowngradeHashAlgorithmXxHash`](https://getrector.com/find-rule), [`DowngradeInstanceofStringable`](https://getrector.com/find-rule), [`DowngradeIsCountable`](https://getrector.com/find-rule), [`DowngradeIsEnum`](https://getrector.com/find-rule), [`DowngradeIteratorCountToArray`](https://getrector.com/find-rule), [`DowngradeJsonDecodeNullAssociativeArg`](https://getrector.com/find-rule), [`DowngradeJsonValidate`](https://getrector.com/find-rule), [`DowngradeListReferenceAssignment`](https://getrector.com/find-rule), [`DowngradeMatchToSwitch`](https://getrector.com/find-rule), [`DowngradeMixedTypeDeclaration`](https://getrector.com/find-rule), [`DowngradeMixedTypeTypedProperty`](https://getrector.com/find-rule), [`DowngradeNamedArgument`](https://getrector.com/find-rule), [`DowngradeNeverTypeDeclaration`](https://getrector.com/find-rule), [`DowngradeNewInInitializer`](https://getrector.com/find-rule), [`DowngradeNewMethodCallWithoutParentheses`](https://getrector.com/find-rule), [`DowngradeNonCapturingCatches`](https://getrector.com/find-rule), [`DowngradeNullCoalescingOperator`](https://getrector.com/find-rule), [`DowngradeNullsafeToTernaryOperator`](https://getrector.com/find-rule), [`DowngradeNumberFormatNoFourthArg`](https://getrector.com/find-rule), [`DowngradeNumericLiteralSeparator`](https://getrector.com/find-rule), [`DowngradeObjectTypeDeclaration`](https://getrector.com/find-rule), [`DowngradeOctalNumber`](https://getrector.com/find-rule), [`DowngradeParameterTypeWidening`](https://getrector.com/find-rule), [`DowngradePhp72JsonConst`](https://getrector.com/find-rule), [`DowngradePhp73JsonConst`](https://getrector.com/find-rule), [`DowngradePhp80ResourceReturnToObject`](https://getrector.com/find-rule), [`DowngradePhp81ResourceReturnToObject`](https://getrector.com/find-rule), [`DowngradePhpToken`](https://getrector.com/find-rule), [`DowngradePipeOperator`](https://getrector.com/find-rule), [`DowngradePregUnmatchedAsNullConstant`](https://getrector.com/find-rule), [`DowngradePreviouslyImplementedInterface`](https://getrector.com/find-rule), [`DowngradeProcOpenArrayCommandArg`](https://getrector.com/find-rule), [`DowngradePropertyPromotion`](https://getrector.com/find-rule), [`DowngradePureIntersectionType`](https://getrector.com/find-rule), [`DowngradeReadonlyAnonymousClass`](https://getrector.com/find-rule), [`DowngradeReadonlyClass`](https://getrector.com/find-rule), [`DowngradeReadonlyProperty`](https://getrector.com/find-rule), [`DowngradeRecursiveDirectoryIteratorHasChildren`](https://getrector.com/find-rule), [`DowngradeReflectionClassGetConstantsFilter`](https://getrector.com/find-rule), [`DowngradeReflectionGetAttributes`](https://getrector.com/find-rule), [`DowngradeReflectionGetType`](https://getrector.com/find-rule), [`DowngradeReflectionPropertyGetDefaultValue`](https://getrector.com/find-rule), [`DowngradeRoundingModeEnum`](https://getrector.com/find-rule), [`DowngradeSetAccessibleReflectionProperty`](https://getrector.com/find-rule), [`DowngradeStandaloneNullTrueFalseReturnType`](https://getrector.com/find-rule), [`DowngradeStaticTypeDeclaration`](https://getrector.com/find-rule), [`DowngradeStrContains`](https://getrector.com/find-rule), [`DowngradeStrEndsWith`](https://getrector.com/find-rule), [`DowngradeStrStartsWith`](https://getrector.com/find-rule), [`DowngradeStreamIsatty`](https://getrector.com/find-rule), [`DowngradeStripTagsCallWithArray`](https://getrector.com/find-rule), [`DowngradeSubstrFalsy`](https://getrector.com/find-rule), [`DowngradeThrowExpr`](https://getrector.com/find-rule), [`DowngradeTrailingCommasInFunctionCalls`](https://getrector.com/find-rule), [`DowngradeTrailingCommasInParamUse`](https://getrector.com/find-rule), [`DowngradeTrailingCommasInUnset`](https://getrector.com/find-rule), [`DowngradeTypedClassConst`](https://getrector.com/find-rule), [`DowngradeTypedProperty`](https://getrector.com/find-rule), [`DowngradeUnionIntersection`](https://getrector.com/find-rule), [`DowngradeUnionTypeDeclaration`](https://getrector.com/find-rule), [`DowngradeUnionTypeTypedProperty`](https://getrector.com/find-rule), [`DowngradeVoidCast`](https://getrector.com/find-rule), [`RemoveReturnTypeDeclarationFromClone`](https://getrector.com/find-rule), [`SetCookieOptionsArrayToArguments`](https://getrector.com/find-rule).

### in no rector-laravel/Pest set

[`ArrayToArrGet`](https://getrector.com/rule-detail/array-to-arr-get-rector), [`CommandPropertyToAsCommandAttribute`](https://getrector.com/rule-detail/command-property-to-as-command-attribute-rector).

### in no set

[`NestedAnnotationToAttribute`](https://getrector.com/rule-detail/nested-annotation-to-attribute-rector).

### laravel upgrade set below laravel-12

[`RemoveTraitUse`](https://getrector.com/rule-detail/remove-trait-use-rector), [`RenameStaticMethod`](https://getrector.com/rule-detail/rename-static-method-rector).

### not correctly added upstream (registered in no set)

[`UseToBeReadableWritable`](https://getrector.com/find-rule).

### only in php52..php81 upgrade sets (below php82)

[`AddParamBasedOnParentClassMethod`](https://getrector.com/rule-detail/add-param-based-on-parent-class-method-rector), [`ArgumentAdder`](https://getrector.com/rule-detail/argument-adder-rector), [`ClassPropertyAssignToConstructorPromotion`](https://getrector.com/rule-detail/class-property-assign-to-constructor-promotion-rector), [`CreateFunctionToAnonymousFunction`](https://getrector.com/rule-detail/create-function-to-anonymous-function-rector), [`PregReplaceEModifier`](https://getrector.com/rule-detail/preg-replace-e-modifier-rector).

### the code it rewrites does not compile on PHP 8.4 (`break 0` and `break $x` are fatal errors since PHP 5.4)

[`RemoveZeroBreakContinue`](https://getrector.com/rule-detail/remove-zero-break-continue-rector).

### the code it rewrites does not compile on PHP 8.4 (`break` outside a loop or `switch` is a fatal error since PHP 7.0)

[`BreakNotInLoopOrSwitchToReturn`](https://getrector.com/rule-detail/break-not-in-loop-or-switch-to-return-rector).

### the code it rewrites does not compile on PHP 8.4 (a `switch` with several `default` cases is a fatal error since PHP 7.0)

[`ReduceMultipleDefaultSwitch`](https://getrector.com/rule-detail/reduce-multiple-default-switch-rector).

### the code it rewrites does not compile on PHP 8.4 (a non-static `__set_state()` method is a fatal error)

[`SetStateToStatic`](https://getrector.com/rule-detail/set-state-to-static-rector).

### the code it rewrites does not compile on PHP 8.4 (an empty `list()` is a fatal error since PHP 7.0)

[`EmptyList`](https://getrector.com/rule-detail/empty-list-rector).

### the code it rewrites does not compile on PHP 8.4 (an unparenthesized nested ternary is a fatal error since PHP 8.0)

[`ParenthesizeNestedTernary`](https://getrector.com/rule-detail/parenthesize-nested-ternary-rector).

### the code it rewrites does not compile on PHP 8.4 (the `(unset)` cast is a fatal error since PHP 8.0)

[`UnsetCast`](https://getrector.com/rule-detail/unset-cast-rector).

### the code it rewrites does not parse on PHP 8.4 (`$string{0}` offset access was removed in PHP 8.0)

[`CurlyToSquareBracketArrayString`](https://getrector.com/rule-detail/curly-to-square-bracket-array-string-rector).

### the code it rewrites does not parse on PHP 8.4 (call-time pass-by-reference was removed in PHP 5.4)

[`RemoveReferenceFromCall`](https://getrector.com/rule-detail/remove-reference-from-call-rector).

## Pun-only rules

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