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.
Expressions\Matches\SortMatchArmsByConditionalRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/333Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to skip references to constants and functions by @localheinz in https://github.com/ergebnis/rector-rules/pull/334Arrays\SortAssociativeArrayByKeyRector in favor of Expressions\Arrays\SortAssociativeArrayByKeyRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/335Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.15.2...1.16.0
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to rewrite references relative to current namespace when file has only prefix import by @localheinz in https://github.com/ergebnis/rector-rules/pull/327Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.15.1...1.15.2
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to rewrite partially-qualified names when forceRelativeReferences is enabled by @localheinz in https://github.com/ergebnis/rector-rules/pull/326Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.15.0...1.15.1
forceRelativeReferences option of Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/325discoverNamespacePrefixes configuration option to Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/324Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.14.1...1.15.0
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/317Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixes targeting PHP 8.1 by @localheinz in https://github.com/ergebnis/rector-rules/pull/319Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixes targeting PHP 8.2 by @localheinz in https://github.com/ergebnis/rector-rules/pull/320Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixes targeting PHP 8.3 by @localheinz in https://github.com/ergebnis/rector-rules/pull/321Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixes targeting PHP 8.4 by @localheinz in https://github.com/ergebnis/rector-rules/pull/322Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRectorWithNamespacePrefixes targeting PHP 8.5 by @localheinz in https://github.com/ergebnis/rector-rules/pull/323Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix by @localheinz in https://github.com/ergebnis/rector-rules/pull/316Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.14.0...1.14.1
forceRelativeReferences option to Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to force relative references by @localheinz in https://github.com/ergebnis/rector-rules/pull/315Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.13.2...1.14.0
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace is the parent namespace prefix by @localheinz in https://github.com/ergebnis/rector-rules/pull/312Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.13.1...1.13.2
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix by @localheinz in https://github.com/ergebnis/rector-rules/pull/311Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.13.0...1.13.1
NamespacePrefix by @localheinz in https://github.com/ergebnis/rector-rules/pull/304Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to allow configuring parent namespace prefixes for automatic discovery of namespace prefixes by @localheinz in https://github.com/ergebnis/rector-rules/pull/310Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.12.5...1.13.0
ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to also rewrite fully-qualified references to namespaced symbols identical to a namespace prefix by @localheinz in https://github.com/ergebnis/rector-rules/pull/303ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to handle grouped use statements by @localheinz in https://github.com/ergebnis/rector-rules/pull/306Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.12.4...1.12.5
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to also fix fully-qualified class names by @localheinz in https://github.com/ergebnis/rector-rules/pull/302Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.12.3...1.12.4
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to skip rewriting when namespace prefix alias collides with declared symbol by @localheinz in https://github.com/ergebnis/rector-rules/pull/301Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.12.2...1.12.3
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to support parent namespace imports by @localheinz in https://github.com/ergebnis/rector-rules/pull/300Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.12.1...1.12.2
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to support overlapping namespace prefixes by @localheinz in https://github.com/ergebnis/rector-rules/pull/299Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.12.0...1.12.1
Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/295Files\UseImportRelativeToNamespacePrefixRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/296Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.11.1...1.12.0
Files\UseImportRelativeToNamespacePrefixRector to adjust DocBlocks as well by @localheinz in https://github.com/ergebnis/rector-rules/pull/294Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.11.0...1.11.1
Files\UseImportRelativeToNamespacePrefixRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/291Files\UseImportRelativeToNamespacePrefixRector to support files without namespace by @localheinz in https://github.com/ergebnis/rector-rules/pull/292Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.10.0...1.11.0
rector/rector:^2.3.8 by @localheinz in https://github.com/ergebnis/rector-rules/pull/290Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.9.0...1.10.0
::class pseudo constants from the original name instead of the fully-qualified class name by @localheinz in https://github.com/ergebnis/rector-rules/pull/265Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.8.0...1.9.0
ArrayItemWithKey by @localheinz in https://github.com/ergebnis/rector-rules/pull/257Rules\Arrays\SortAssociativeArrayByKeyRector to resolve values for keys referring to ::class pseudo constants by @localheinz in https://github.com/ergebnis/rector-rules/pull/258Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.7.0...1.8.0
infection/infection by @localheinz in https://github.com/ergebnis/rector-rules/pull/247rector/rector:^2.1.3 by @localheinz in https://github.com/ergebnis/rector-rules/pull/248fakerphp/faker by @localheinz in https://github.com/ergebnis/rector-rules/pull/250Rules\Faker\GeneratorPropertyFetchToMethodCallRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/249Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.6.0...1.7.0
Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.5.1...1.6.0
comparison_function with unexpected value by @localheinz in https://github.com/ergebnis/rector-rules/pull/216Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.5.0...1.5.1
SortAssociativeArrayByKeyRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/210Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.4.0...1.5.0
rector/rector:^2.0.11 by @localheinz in https://github.com/ergebnis/rector-rules/pull/199PHPUnit\Framework\TestCase by @localheinz in https://github.com/ergebnis/rector-rules/pull/200Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.3.0...1.4.0
rector/rector:^2.0.0 by @localheinz in https://github.com/ergebnis/rector-rules/pull/171Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.2.0...1.3.0
rector/rector:^1.0.0 by @localheinz in https://github.com/ergebnis/rector-rules/pull/161ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/rector-rules/pull/159Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.1.0...1.2.0
Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.0.1...1.1.0
rector/rector:~0.19.2 by @localheinz in https://github.com/ergebnis/rector-rules/pull/77Full Changelog: https://github.com/ergebnis/rector-rules/compare/1.0.0...1.0.1
rector/rector:^1.0.0 by @localheinz in https://github.com/ergebnis/rector-rules/pull/76Full Changelog: https://github.com/ergebnis/rector-rules/compare/0.4.0...1.0.0
ergebnis/phpunit-slow-test-detector by @localheinz in https://github.com/ergebnis/rector-rules/pull/39ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/rector-rules/pull/40ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/rector-rules/pull/55rector/rector by @localheinz in https://github.com/ergebnis/rector-rules/pull/64nikic/php-parser:^5.0.0 by @localheinz in https://github.com/ergebnis/rector-rules/pull/65Full Changelog: https://github.com/ergebnis/rector-rules/compare/0.3.0...0.4.0
Full Changelog: https://github.com/ergebnis/rector-rules/compare/0.2.0...0.3.0
platform by @localheinz in https://github.com/ergebnis/rector-rules/pull/33ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/rector-rules/pull/35Full Changelog: https://github.com/ergebnis/rector-rules/compare/0.1.0...0.2.0
Rules\Arrays\SortAssociativeArrayByKeyRector by @localheinz in https://github.com/ergebnis/rector-rules/pull/1Full Changelog: https://github.com/ergebnis/rector-rules/commits/0.1.0
How can I help you explore Laravel packages today?