Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rector Rules Laravel Package

ergebnis/rector-rules

Custom Rector rules from Ergebnis to standardize and modernize PHP code. Includes sorting associative arrays and match arms, converting Faker generator property fetches to method calls, and fixing namespaced symbol references. Install via Composer for dev.

View on GitHub
Deep Wiki
Context7
`1.9.0`

For a full diff see [1.8.0...1.9.0][1.8.0...1.9.0].

Changed

  • Adjusted Rules\Arrays\SortAssociativeArrayByKeyRector to resolve values for keys referring to ::class pseudo constants from the original name instead of the fully-qualified class name ([#265]), by [@localheinz]
`1.8.0`

For a full diff see [1.7.0...1.8.0][1.7.0...1.8.0].

Changed

  • Adjusted Rules\Arrays\SortAssociativeArrayByKeyRector to resolve values for keys referring to ::class pseudo constants ([#258]), by [@localheinz]
`1.7.0`

For a full diff see [1.6.0...1.7.0][1.6.0...1.7.0].

Added

  • Added Rules\Faker\GeneratorPropertyFetchToMethodCallRector to allow replacing references to deprecated properties of Faker\Generator with method calls ([#249]), by [@localheinz]

Changed

  • Required rector/rector:^2.1.3 ([#248]), by [@localheinz]
`1.6.0`

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.1`

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 strcmp as default comparison function in Rules\Arrays\SortAssociativeArrayByKeyRector ([#216]), by [@localheinz]
`1.5.0`

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]
`1.4.0`

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\SortAssociativeArrayByKeyRector to stop ignoring associative arrays used in sub-classes of PHPUnit\Framework\TestCase ([#200]), by [@localheinz]
`1.3.0`

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]
`1.2.0`

For a full diff see [1.1.0...1.2.0][1.1.0...1.2.0].

Added

Changed

  • Required rector/rector:^1.0.0 ([#161]), by [@localheinz]
`1.16.0`

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\SortAssociativeArrayByKeyRector in favor of Expressions\Arrays\SortAssociativeArrayByKeyRector ([#335]), by [@localheinz]

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to skip fully-qualified function calls and constant references ([#334]), by [@localheinz]
`1.15.2`

For a full diff see [1.15.1...1.15.2][1.15.1...1.15.2].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to rewrite references relative to current namespace when file has only prefix import ([#327]), by [@localheinz]
`1.15.1`

For a full diff see [1.15.0...1.15.1][1.15.0...1.15.1].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to rewrite partially-qualified names when forceRelativeReferences is enabled ([#326]), by [@localheinz]
`1.15.0`

For a full diff see [1.14.1...1.15.0][1.14.1...1.15.0].

Added

  • Added discoverNamespacePrefixes configuration option to Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to automatically discover parent namespace prefixes from file references ([#324]), by [@localheinz]
`1.14.1`

For a full diff see [1.14.0...1.14.1][1.14.0...1.14.1].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix ([#316]), by [@localheinz]
`1.14.0`

For a full diff see [1.13.2...1.14.0][1.13.2...1.14.0].

Added

  • Added forceRelativeReferences configuration option to Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to 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\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector and Rules\Files\UseImportRelativeToNamespacePrefixRector to reject arrays that are not lists ([#314]), by [@localheinz]
`1.13.2`

For a full diff see [1.13.1...1.13.2][1.13.1...1.13.2].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace is the parent namespace prefix ([#312]), by [@localheinz]
`1.13.1`

For a full diff see [1.13.0...1.13.1][1.13.0...1.13.1].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix ([#312]), by [@localheinz]
`1.13.0`

For a full diff see [1.12.5...1.13.0][1.12.5...1.13.0].

Added

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to allow configuring parent namespace prefixes for automatic discovery of namespace prefixes ([#310]), by [@localheinz]
`1.12.5`

For a full diff see [1.12.4...1.12.5][1.12.4...1.12.5].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to also rewrite fully-qualified references to namespaced symbols identical to a namespace prefix ([#303]), by [@localheinz]
  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to handle grouped use statements ([#306]), by [@localheinz]
`1.12.4`

For a full diff see [1.12.3...1.12.4][1.12.3...1.12.4].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to handle fully qualified references ([#302]), by [@localheinz]
`1.12.3`

For a full diff see [1.12.2...1.12.3][1.12.2...1.12.3].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to skip rewriting when the namespace prefix alias collides with a class, interface, trait, or enum declared in the same file ([#301]), by [@localheinz]
`1.12.2`

For a full diff see [1.12.1...1.12.2][1.12.1...1.12.2].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to support parent namespace imports ([#300]), by [@localheinz]
`1.12.1`

For a full diff see [1.12.0...1.12.1][1.12.0...1.12.1].

Fixed

  • Adjusted Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to support overlapping namespace prefixes by deferring to the more specific prefix ([#298]), by [@localheinz]
`1.12.0`

For a full diff see [1.11.1...1.12.0][1.11.1...1.12.0].

Added

  • Added Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to 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\SortAssociativeArrayByKeyRector and Rules\Files\UseImportRelativeToNamespacePrefixRector to reject unknown configuration keys ([#297]), by [@localheinz]

Deprecated

  • Deprecated Rules\Files\UseImportRelativeToNamespacePrefixRector in favor of Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector ([#296]), by [@localheinz]
`1.11.1`

For a full diff see [1.11.0...1.11.1][1.11.0...1.11.1].

Fixed

  • Adjusted Rules\Files\UseImportRelativeToNamespacePrefixRector to adjust DocBlocks as well ([#294]), by [@localheinz]
`1.11.0`

For a full diff see [1.10.0...1.11.0][1.10.0...1.11.0].

Added

  • Added Rules\Files\UseImportRelativeToNamespacePrefixRector to allow replacing sub-namespace imports with parent namespace imports and updating references to use relative names ([#291]), by [@localheinz]
`1.10.0`

For a full diff see [1.9.0...1.10.0][1.9.0...1.10.0].

Added

Fixed

  • Required rector/rector:^2.3.8 ([#290]), by [@localheinz]
`1.1.0`

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.1`

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]
`1.0.0`

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]
`0.4.0`

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]
`0.3.0`

For a full diff see [0.2.0...0.3.0][0.2.0...0.3.0].

Added

`0.2.0`

For a full diff see [0.1.0...0.2.0][0.1.0...0.2.0].

Added

Changed

`0.1.0`

For a full diff see fd198f0...0.1.0.

Added

  • Added Rules\Arrays\SortAssociativeArrayByKeyRector (#1), by [@localheinz]

[@localheinz]: https://github.com/localheinz

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4