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.
For a full diff see [1.8.0...1.9.0][1.8.0...1.9.0].
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]For a full diff see [1.7.0...1.8.0][1.7.0...1.8.0].
Rules\Arrays\SortAssociativeArrayByKeyRector to resolve values for keys referring to ::class pseudo constants ([#258]), by [@localheinz]For a full diff see [1.6.0...1.7.0][1.6.0...1.7.0].
Rules\Faker\GeneratorPropertyFetchToMethodCallRector to allow replacing references to deprecated properties of Faker\Generator with method calls ([#249]), by [@localheinz]rector/rector:^2.1.3 ([#248]), by [@localheinz]For a full diff see [1.5.1...1.6.0][1.5.1...1.6.0].
For a full diff see [1.5.0...1.5.1][1.5.0...1.5.1].
Rules\Arrays\SortAssociativeArrayByKeyRector ([#210]), by [@localheinz]strcmp as default comparison function in Rules\Arrays\SortAssociativeArrayByKeyRector ([#216]), by [@localheinz]For a full diff see [1.4.0...1.5.0][1.4.0...1.5.0].
Rules\Arrays\SortAssociativeArrayByKeyRector ([#210]), by [@localheinz]For a full diff see [1.3.0...1.4.0][1.3.0...1.4.0].
rector/rector:^2.0.11 ([#199]), by [@localheinz]Rules\Arrays\SortAssociativeArrayByKeyRector to stop ignoring associative arrays used in sub-classes of PHPUnit\Framework\TestCase ([#200]), by [@localheinz]For a full diff see [1.2.0...1.3.0][1.2.0...1.3.0].
rector/rector:^2.0.0 ([#171]), by [@localheinz]For a full diff see [1.1.0...1.2.0][1.1.0...1.2.0].
rector/rector:^1.0.0 ([#161]), by [@localheinz]For a full diff see [1.15.2...1.16.0][1.15.2...1.16.0].
Rules\Expressions\Matches\SortMatchArmsByConditionalRector ([#333]), by [@localheinz]Arrays\SortAssociativeArrayByKeyRector in favor of Expressions\Arrays\SortAssociativeArrayByKeyRector ([#335]), by [@localheinz]Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to skip fully-qualified function calls and constant references ([#334]), by [@localheinz]For a full diff see [1.15.1...1.15.2][1.15.1...1.15.2].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to rewrite references relative to current namespace when file has only prefix import ([#327]), by [@localheinz]For a full diff see [1.15.0...1.15.1][1.15.0...1.15.1].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to rewrite partially-qualified names when forceRelativeReferences is enabled ([#326]), by [@localheinz]For a full diff see [1.14.1...1.15.0][1.14.1...1.15.0].
discoverNamespacePrefixes configuration option to Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to automatically discover parent namespace prefixes from file references ([#324]), by [@localheinz]For a full diff see [1.14.0...1.14.1][1.14.0...1.14.1].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix ([#316]), by [@localheinz]For a full diff see [1.13.2...1.14.0][1.13.2...1.14.0].
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]Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector and Rules\Files\UseImportRelativeToNamespacePrefixRector to reject arrays that are not lists ([#314]), by [@localheinz]For a full diff see [1.13.1...1.13.2][1.13.1...1.13.2].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace is the parent namespace prefix ([#312]), by [@localheinz]For a full diff see [1.13.0...1.13.1][1.13.0...1.13.1].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix ([#312]), by [@localheinz]For a full diff see [1.12.5...1.13.0][1.12.5...1.13.0].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to allow configuring parent namespace prefixes for automatic discovery of namespace prefixes ([#310]), by [@localheinz]For a full diff see [1.12.4...1.12.5][1.12.4...1.12.5].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to also rewrite fully-qualified references to namespaced symbols identical to a namespace prefix ([#303]), by [@localheinz]Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to handle grouped use statements ([#306]), by [@localheinz]For a full diff see [1.12.3...1.12.4][1.12.3...1.12.4].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to handle fully qualified references ([#302]), by [@localheinz]For a full diff see [1.12.2...1.12.3][1.12.2...1.12.3].
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]For a full diff see [1.12.1...1.12.2][1.12.1...1.12.2].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to support parent namespace imports ([#300]), by [@localheinz]For a full diff see [1.12.0...1.12.1][1.12.0...1.12.1].
Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to support overlapping namespace prefixes by deferring to the more specific prefix ([#298]), by [@localheinz]For a full diff see [1.11.1...1.12.0][1.11.1...1.12.0].
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]Rules\Arrays\SortAssociativeArrayByKeyRector and Rules\Files\UseImportRelativeToNamespacePrefixRector to reject unknown configuration keys ([#297]), by [@localheinz]Rules\Files\UseImportRelativeToNamespacePrefixRector in favor of Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector ([#296]), by [@localheinz]For a full diff see [1.11.0...1.11.1][1.11.0...1.11.1].
Rules\Files\UseImportRelativeToNamespacePrefixRector to adjust DocBlocks as well ([#294]), by [@localheinz]For a full diff see [1.10.0...1.11.0][1.10.0...1.11.0].
Rules\Files\UseImportRelativeToNamespacePrefixRector to allow replacing sub-namespace imports with parent namespace imports and updating references to use relative names ([#291]), by [@localheinz]For a full diff see [1.9.0...1.10.0][1.9.0...1.10.0].
rector/rector:^2.3.8 ([#290]), by [@localheinz]For a full diff see [1.0.1...1.1.0][1.0.1...1.1.0].
For a full diff see [1.0.0...1.0.1][1.0.0...1.0.1].
rector/rector:~0.19.2 ([#77]), by [@localheinz]For a full diff see [0.4.0...1.0.0][0.4.0...1.0.0].
rector/rector:^1.0.0 ([#76]), by [@localheinz]For a full diff see [0.3.0...0.4.0][0.3.0...0.4.0].
rector/rector:~0.19.2 ([#64]), by [@localheinz]nikic/php-parser:^5.0.0 ([#65]), by [@localheinz]For a full diff see [0.2.0...0.3.0][0.2.0...0.3.0].
For a full diff see [0.1.0...0.2.0][0.1.0...0.2.0].
For a full diff see fd198f0...0.1.0.
Rules\Arrays\SortAssociativeArrayByKeyRector (#1), by [@localheinz]How can I help you explore Laravel packages today?