ergebnis/rector-rules
Provides rules for rector/rector.
1.18.3
297K downloads/mo
#4023 most downloaded on Packagist
ergebnis/rector-rules
What this package is like to depend on
Last release 1 months ago
06 Jul 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 39 of 39 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
39 releases · first in 2023
26 releases in the last 12 months
see the full history below
Release timeline
39 releases · Sep 2023 to Jul 2026Releases
latest 39-
1.18.306 Jul 2026Release notes
Open source →What's Changed
- github-actions(deps): Bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #357
- github-actions(deps): Bump actions/cache from 5.0.5 to 6.1.0 by @dependabot[bot] in #359
- github-actions(deps): Bump zizmorcore/zizmor-action from 0.5.6 to 0.5.7 by @dependabot[bot] in #360
- composer(deps-dev): Bump ergebnis/php-cs-fixer-config from 6.62.1 to 6.62.2 by @dependabot[bot] in #358
- Fix: Reference namespaced symbols in doc blocks consistently with code by @localheinz in #361
Full Changelog: 1.18.2...1.18.3
Release notes
Open source →For a full diff see [
1.18.2...1.18.3][1.18.2...1.18.3].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto reference namespaced symbols in doc blocks consistently with code ([#361]), by [@localheinz]
-
1.18.222 Jun 2026Release notes
Open source →What's Changed
- github-actions(deps): Bump actions/cache from 5.0.4 to 5.0.5 by @dependabot[bot] in #340
- composer(deps-dev): Bump ergebnis/composer-normalize from 2.50.0 to 2.51.0 by @dependabot[bot] in #342
- composer(deps-dev): Bump phpstan/phpstan-strict-rules from 2.0.10 to 2.0.11 by @dependabot[bot] in #343
- composer(deps-dev): Bump ergebnis/php-cs-fixer-config from 6.60.2 to 6.62.0 by @dependabot[bot] in #344
- composer(deps-dev): Bump ergebnis/php-cs-fixer-config from 6.62.0 to 6.62.1 by @dependabot[bot] in #345
- github-actions(deps): Bump shivammathur/setup-php from 2.37.0 to 2.37.1 by @dependabot[bot] in #348
- composer(deps-dev): Bump ergebnis/composer-normalize from 2.51.0 to 2.52.0 by @dependabot[bot] in #347
- Enhancement: Run GitHub Actions analysis with
zizmorby @localheinz in #349 - Enhancement: Enable auto-merge by @localheinz in #350
- github-actions(deps): Bump codecov/codecov-action from 6.0.0 to 7.0.0 by @dependabot[bot] in #352
- Fix: Move zizmor artipacked ignore for
renew.yamlinto configuration by @localheinz in #353 - github-actions(deps): Bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #351
- github-actions(deps): Bump shivammathur/setup-php from 2.37.1 to 2.37.2 by @dependabot[bot] in #354
- Fix: Return
nullwhen node was not modified by @localheinz in #355
Full Changelog: 1.18.1...1.18.2
Release notes
Open source →For a full diff see [
1.18.1...1.18.2][1.18.1...1.18.2].Fixed
- Adjusted
Rules\Expressions\Arrays\SortAssociativeArrayByKeyRectorandRules\Expressions\Matches\SortMatchArmsByConditionalRectorto returnnullwhen they do not modify a node to avoid cache invalidation ([#355]), by [@localheinz]
-
1.18.113 Apr 2026Release notes
Open source →What's Changed
- Enhancement: Add list of supported PHP versions by @localheinz in #338
- Fix: Adjust
RemoveNamedArgumentForSingleParameterRectorto ignore first-class callables by @localheinz in #339
Full Changelog: 1.18.0...1.18.1
Release notes
Open source →For a full diff see [
1.18.0...1.18.1][1.18.0...1.18.1].Fixed
- Adjusted
Rules\Expressions\CallLikes\RemoveNamedArgumentForSingleParameterRectorto ignore first-class callables ([#339]), by [@localheinz]
-
1.18.013 Apr 2026Release notes
Open source →What's Changed
- Enhancement: Implement
CallLikes\RemoveNamedArgumentForSingleParameterby @localheinz in #337
Full Changelog: 1.17.0...1.18.0
Release notes
Open source →For a full diff see [
1.17.0...1.18.0][1.17.0...1.18.0].Added
- Added
Rules\Expressions\CallLikes\RemoveNamedArgumentForSingleParameterRector([#337]), by [@localheinz]
- Enhancement: Implement
-
1.17.009 Apr 2026Release notes
Open source →What's Changed
- Enhancement: Implement
PHPUnit\ReplaceTestAttributeWithTestPrefixRectorby @localheinz in #336
Full Changelog: 1.16.0...1.17.0
Release notes
Open source →For a full diff see [
1.16.0...1.17.0][1.16.0...1.17.0].Added
- Added
Rules\PHPUnit\ReplaceTestAttributeWithTestPrefixRector([#336]), by [@localheinz]
- Enhancement: Implement
-
1.16.001 Apr 2026Release notes
Open source →What's Changed
- github-actions(deps): Bump actions/cache from 5.0.3 to 5.0.4 by @dependabot[bot] in #329
- github-actions(deps): Bump codecov/codecov-action from 5.5.2 to 5.5.3 by @dependabot[bot] in #328
- github-actions(deps): Bump codecov/codecov-action from 5.5.3 to 6.0.0 by @dependabot[bot] in #330
- Fix: Stop prematurely considering node as changed by @localheinz in #332
- Enhancement: Generate documentation from rule configuration and code samples by @localheinz in #331
- Enhancement: Implement
Expressions\Matches\SortMatchArmsByConditionalRectorby @localheinz in #333 - Fix: Adjust
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto skip references to constants and functions by @localheinz in #334 - Fix: Deprecate
Arrays\SortAssociativeArrayByKeyRectorin favor ofExpressions\Arrays\SortAssociativeArrayByKeyRectorby @localheinz in #335
Full Changelog: 1.15.2...1.16.0
Release notes
Open source →For a full diff see [
1.15.2...1.16.0][1.15.2...1.16.0].Added
- Added
Rules\Expressions\Matches\SortMatchArmsByConditionalRector([#333]), by [@localheinz]
Deprecated
- Deprecated
Arrays\SortAssociativeArrayByKeyRectorin favor ofExpressions\Arrays\SortAssociativeArrayByKeyRector([#335]), by [@localheinz]
Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto skip fully-qualified function calls and constant references ([#334]), by [@localheinz]
-
1.15.222 Mar 2026Release notes
Open source →What's Changed
- Fix: Adjust
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto rewrite references relative to current namespace when file has only prefix import by @localheinz in #327
Full Changelog: 1.15.1...1.15.2
Release notes
Open source →For a full diff see [
1.15.1...1.15.2][1.15.1...1.15.2].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto rewrite references relative to current namespace when file has only prefix import ([#327]), by [@localheinz]
- Fix: Adjust
-
1.15.120 Mar 2026Release notes
Open source →What's Changed
- Fix: Adjust
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto rewrite partially-qualified names whenforceRelativeReferencesis enabled by @localheinz in #326
Full Changelog: 1.15.0...1.15.1
Release notes
Open source →For a full diff see [
1.15.0...1.15.1][1.15.0...1.15.1].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto rewrite partially-qualified names whenforceRelativeReferencesis enabled ([#326]), by [@localheinz]
- Fix: Adjust
-
1.15.020 Mar 2026Release notes
Open source →What's Changed
- Fix: Add test fixtures for
forceRelativeReferencesoption ofFiles\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorby @localheinz in #325 - Enhancement: Add
discoverNamespacePrefixesconfiguration option toFiles\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorby @localheinz in #324
Full Changelog: 1.14.1...1.15.0
Release notes
Open source →For a full diff see [
1.14.1...1.15.0][1.14.1...1.15.0].Added
- Added
discoverNamespacePrefixesconfiguration option toRules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto automatically discover parent namespace prefixes from file references ([#324]), by [@localheinz]
- Fix: Add test fixtures for
-
1.14.119 Mar 2026Release notes
Open source →What's Changed
- Fix: Revise test fixtures for
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorby @localheinz in #317 - Fix: Add fixtures for
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixestargeting PHP 8.1 by @localheinz in #319 - Fix: Add fixtures for
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixestargeting PHP 8.2 by @localheinz in #320 - Fix: Add fixtures for
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixestargeting PHP 8.3 by @localheinz in #321 - Fix: Add fixtures for
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixestargeting PHP 8.4 by @localheinz in #322 - Fix: Add fixtures for
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixestargeting PHP 8.5 by @localheinz in #323 - Fix: Adjust
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto remove imports in file where namespace is identical to namespace prefix by @localheinz in #316
Full Changelog: 1.14.0...1.14.1
Release notes
Open source →For a full diff see [
1.14.0...1.14.1][1.14.0...1.14.1].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto remove imports in file where namespace is identical to namespace prefix ([#316]), by [@localheinz]
- Fix: Revise test fixtures for
-
1.14.018 Mar 2026Release notes
Open source →For a full diff see [
1.13.2...1.14.0][1.13.2...1.14.0].Added
- Added
forceRelativeReferencesconfiguration option toRules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto force references to be expressed relative to the namespace prefix even when the file namespace matches the prefix ([#315]), by [@localheinz]
Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorandRules\Files\UseImportRelativeToNamespacePrefixRectorto reject arrays that are not lists ([#314]), by [@localheinz]
- Added
-
1.13.218 Mar 2026Release notes
Open source →For a full diff see [
1.13.1...1.13.2][1.13.1...1.13.2].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto remove unnecessary imports without adding a prefix import when the file namespace is the parent namespace prefix ([#312]), by [@localheinz]
- Adjusted
-
1.13.118 Mar 2026Release notes
Open source →For a full diff see [
1.13.0...1.13.1][1.13.0...1.13.1].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix ([#312]), by [@localheinz]
- Adjusted
-
1.13.017 Mar 2026Release notes
Open source →For a full diff see [
1.12.5...1.13.0][1.12.5...1.13.0].Added
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto allow configuring parent namespace prefixes for automatic discovery of namespace prefixes ([#310]), by [@localheinz]
- Adjusted
-
1.12.516 Mar 2026Release notes
Open source →For a full diff see [
1.12.4...1.12.5][1.12.4...1.12.5].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto also rewrite fully-qualified references to namespaced symbols identical to a namespace prefix ([#303]), by [@localheinz] - Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto handle grouped use statements ([#306]), by [@localheinz]
- Adjusted
-
1.12.413 Mar 2026Release notes
Open source →For a full diff see [
1.12.3...1.12.4][1.12.3...1.12.4].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto handle fully qualified references ([#302]), by [@localheinz]
- Adjusted
-
1.12.313 Mar 2026Release notes
Open source →For a full diff see [
1.12.2...1.12.3][1.12.2...1.12.3].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto skip rewriting when the namespace prefix alias collides with a class, interface, trait, or enum declared in the same file ([#301]), by [@localheinz]
- Adjusted
-
1.12.213 Mar 2026Release notes
Open source →For a full diff see [
1.12.1...1.12.2][1.12.1...1.12.2].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto support parent namespace imports ([#300]), by [@localheinz]
- Adjusted
-
1.12.112 Mar 2026Release notes
Open source →For a full diff see [
1.12.0...1.12.1][1.12.0...1.12.1].Fixed
- Adjusted
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto support overlapping namespace prefixes by deferring to the more specific prefix ([#298]), by [@localheinz]
- Adjusted
-
1.12.012 Mar 2026Release notes
Open source →For a full diff see [
1.11.1...1.12.0][1.11.1...1.12.0].Added
- Added
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorto replace references to namespaced symbols (classes, functions, constants) whose fully-qualified name starts with a namespace prefix so they are relative to that prefix ([#295]), by [@localheinz]
Fixed
- Adjusted
Rules\Arrays\SortAssociativeArrayByKeyRectorandRules\Files\UseImportRelativeToNamespacePrefixRectorto reject unknown configuration keys ([#297]), by [@localheinz]
Deprecated
- Deprecated
Rules\Files\UseImportRelativeToNamespacePrefixRectorin favor ofRules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector([#296]), by [@localheinz]
- Added
-
1.11.111 Mar 2026Release notes
Open source →For a full diff see [
1.11.0...1.11.1][1.11.0...1.11.1].Fixed
- Adjusted
Rules\Files\UseImportRelativeToNamespacePrefixRectorto adjust DocBlocks as well ([#294]), by [@localheinz]
- Adjusted
-
1.11.011 Mar 2026Release notes
Open source →For a full diff see [
1.10.0...1.11.0][1.10.0...1.11.0].Added
- Added
Rules\Files\UseImportRelativeToNamespacePrefixRectorto allow replacing sub-namespace imports with parent namespace imports and updating references to use relative names ([#291]), by [@localheinz]
- Added
-
1.10.011 Mar 2026Release notes
Open source →For a full diff see [
1.9.0...1.10.0][1.9.0...1.10.0].Added
- Added support for PHP 8.5 ([#281]), by [@localheinz]
Fixed
- Required
rector/rector:^2.3.8([#290]), by [@localheinz]
-
1.9.021 Dec 2025Release notes
Open source →For a full diff see [
1.8.0...1.9.0][1.8.0...1.9.0].Changed
- Adjusted
Rules\Arrays\SortAssociativeArrayByKeyRectorto resolve values for keys referring to::classpseudo constants from the original name instead of the fully-qualified class name ([#265]), by [@localheinz]
- Adjusted
-
1.8.008 Dec 2025Release notes
Open source →For a full diff see [
1.7.0...1.8.0][1.7.0...1.8.0].Changed
- Adjusted
Rules\Arrays\SortAssociativeArrayByKeyRectorto resolve values for keys referring to::classpseudo constants ([#258]), by [@localheinz]
- Adjusted
-
1.7.017 Nov 2025Release notes
Open source →For a full diff see [
1.6.0...1.7.0][1.6.0...1.7.0].Added
- Added
Rules\Faker\GeneratorPropertyFetchToMethodCallRectorto allow replacing references to deprecated properties ofFaker\Generatorwith method calls ([#249]), by [@localheinz]
Changed
- Required
rector/rector:^2.1.3([#248]), by [@localheinz]
- Added
-
1.6.019 Aug 2025Release notes
Open source →For a full diff see [
1.5.1...1.6.0][1.5.1...1.6.0].Changed
- Allowed installation on PHP 8.5 ([#225]), by [@localheinz]
-
1.5.117 Jul 2025Release notes
Open source →For a full diff see [
1.5.0...1.5.1][1.5.0...1.5.1].Fixed
- Removed an unnecessary condition in
Rules\Arrays\SortAssociativeArrayByKeyRector([#210]), by [@localheinz] - Reverted back to using
strcmpas default comparison function inRules\Arrays\SortAssociativeArrayByKeyRector([#216]), by [@localheinz]
- Removed an unnecessary condition in
-
1.5.016 Jul 2025Release notes
Open source →For a full diff see [
1.4.0...1.5.0][1.4.0...1.5.0].Changed
- Allowed configuring
Rules\Arrays\SortAssociativeArrayByKeyRector([#210]), by [@localheinz]
- Allowed configuring
-
1.4.015 Apr 2025Release notes
Open source →For a full diff see [
1.3.0...1.4.0][1.3.0...1.4.0].Changed
- Required
rector/rector:^2.0.11([#199]), by [@localheinz] - Adjusted
Rules\Arrays\SortAssociativeArrayByKeyRectorto stop ignoring associative arrays used in sub-classes ofPHPUnit\Framework\TestCase([#200]), by [@localheinz]
- Required
-
1.3.008 Jan 2025Release notes
Open source →For a full diff see [
1.2.0...1.3.0][1.2.0...1.3.0].Added
- Added support for
rector/rector:^2.0.0([#171]), by [@localheinz]
- Added support for
-
1.2.023 Nov 2024Release notes
Open source →For a full diff see [
1.1.0...1.2.0][1.1.0...1.2.0].Added
- Added support for PHP 8.4 ([#162]), by [@localheinz]
Changed
- Required
rector/rector:^1.0.0([#161]), by [@localheinz]
-
1.1.027 Sep 2024Release notes
Open source →For a full diff see [
1.0.1...1.1.0][1.0.1...1.1.0].Changed
- Allowed installation on PHP 8.4 ([#139]), by [@localheinz]
-
1.0.107 Feb 2024Release notes
Open source →For a full diff see [
1.0.0...1.0.1][1.0.0...1.0.1].Fixed
- Allowed installation of
rector/rector:~0.19.2([#77]), by [@localheinz]
- Allowed installation of
-
1.0.006 Feb 2024Release notes
Open source →For a full diff see [
0.4.0...1.0.0][0.4.0...1.0.0].Changed
- Required
rector/rector:^1.0.0([#76]), by [@localheinz]
- Required
-
0.4.023 Jan 2024Release notes
Open source →For a full diff see [
0.3.0...0.4.0][0.3.0...0.4.0].Changed
- Required
rector/rector:~0.19.2([#64]), by [@localheinz] - Allowed installation of
nikic/php-parser:^5.0.0([#65]), by [@localheinz]
- Required
-
0.3.029 Nov 2023Release notes
Open source →For a full diff see [
0.2.0...0.3.0][0.2.0...0.3.0].Added
- Added support for PHP 8.0 ([#36]), by [@localheinz]
- Added support for PHP 7.4 ([#37]), by [@localheinz]
-
0.2.028 Nov 2023Release notes
Open source →For a full diff see [
0.1.0...0.2.0][0.1.0...0.2.0].Added
- Added support for PHP 8.3 ([#34]), by [@localheinz]
Changed
- Updated `rector/rector ([#3]), by [@localheinz]
-
0.1.030 Sep 2023Release notes
Open source →For a full diff see
fd198f0...0.1.0.Added
- Added
Rules\Arrays\SortAssociativeArrayByKeyRector(#1), by @localheinz
- Added