chore(deps): update dependency rector/rector to ^2.6.7 (master) - #3007
Merged
Merged
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.0→^2.6.7Release Notes
rectorphp/rector (rector/rector)
v2.6.7: Released Rector 2.6.7Compare Source
Agentic Experience
This release improves Rector for automated, CI and non-interactive workflows: validate configuration without processing files, limit the amount of changes per run, select multiple rules at once, and get more useful machine-readable output.
^2.2.14and PHP-Parser to^5.9, regenerate preload (#8491)New
validate-configcommand (#8450, #8452)New
validate-configcommand checksrector.phpfor configuration issues without processing any source files.It reports deprecated rules and configuration, invalid skips, duplicated rule registrations and other config hygiene issues. A valid config exits with
0, while detected issues exit with1, so the command can be used directly as a CI gate.For machine-readable output:
{ "valid": true, "issue_count": 0 }Limit a run with
--max-changes(#8449)New
--max-changesoption lets automated runs process changes in smaller batches:The limit counts applied rule changes rather than files. The current file is always finished before Rector stops, so the final number may be slightly above the requested limit.
Run multiple rules with
--only(#8451)--onlycan now be repeated to run several selected rules in a single pass:vendor/bin/rector process \ --only=App\\Rector\\FooRector \ --only=App\\Rector\\BarRectorA single
--onlycontinues to work as before.Per-line rule attribution in JSON output (#8448)
JSON output now includes a
changeslist with the Rector rule and source line for every applied change:{ "changes": [ { "rector": "Rector\\Php80\\Rector\\Identical\\StrStartsWithRector", "line": 38 } ] }The existing
applied_rectorsfield remains unchanged for backward compatibility.Cleaner non-interactive output
Non-interactive runs are now quieter and safer:
--ansi(#8453)rector.phpwhen input is non-interactive (#8454)Sets
DirnameDirConcatStringToDirectStringPathRectorto the code-quality set (#8470)NarrowBoolDocblockReturnTypeRectorto the type-declaration-docblocks set (#8484)Bugfixes 🐛
CompleteDynamicPropertiesRector: skip when a not-autoloaded ancestor may already declare the property (#8441)TypeDeclarationDocblocks: restrict array docblock inference to safer/private cases and avoid narrowing properties with incompatible assignment shapes (#8435, #8436, #8437, #8442)DocblockVarArrayFromPropertyDefaultsRector: widen empty nested array defaults tomixed[]instead ofnever[](#8439, #8474)DocblockReturnArrayFromDirectArrayInstanceRector: skip empty array returns instead of producing an overly narrowarray{}docblock (#8434)IfToNullCoalescingAssignRector: preserve comments inside the convertedif(#8443)RemoveDeadIfBlockRector: keep emptyifwithelseifand trailingelsewhere rewriting would change behavior (#8446)RemoveParentDelegatingClassMethodRector: keep delegating methods carrying annotations such as@Route(#8459)StrContainsRector: skip empty string needles to avoid behavior changes (#8460)RemoveDeadCatchRector: keep rethrowing catches before catch-allThrowable/Exceptionhandlers (#8462)SimplifyUselessVariableRector: preserve variables referenced by commented-out code and stop folding compound assignments into returns (#8468)ReplaceArgumentDefaultValueRector: avoid re-applying already migrated imported class constants and correctly report applied changes (#8475)ForeachToArrayAnyRector: do not dropelseiforelsebranches when converting aforeach(#8480)Option::SOURCEfrom the actually resolved paths in regular Rector runs (#8424)Deprecations 💀
--rules-summary- use--output-format=json, which provides applied rules together with files and lines (#8457)DynamicDocBlockPropertyToNativePropertyRector- could change a public-by-design@propertyinto a private native property (#8470)FluentSettersToStandaloneCallMethodRectorandRemoveReturnThisFromSetterClassMethodRector- fluent API semantics are too use-case dependent for a generic transformation (#8473)ListSwapArrayOrderRector- can turn validlist()assignments into broken code; removed from PHP 7.0 sets (#8477)RenameDeprecatedMethodCallRector- inferring replacement methods from free-text@deprecateddescriptions is too risky; explicit rename rules are more predictable (#8485)rector-doctrine 🟠
TypedPropertyFromToOneRelationTypeRector: skip untyped parent property overrides (#520)TypedPropertyFromColumnTypeRector: skip untyped parent property overrides (#521)TypedPropertyFromColumnTypeRector: fix numeric defaults fordecimal/bigintcolumns (#522)TypedPropertyFromColumnTypeRector: make generated property type nullable when anulldefault is present (#523)rector-phpunit 🟢
RemoveNamedArgsInDataProviderRector(#782)rector-symfony 🎵
EnableValidationAttributesRectorinto the composer-based upgrade path (#1065)ConsoleExecuteReturnIntRector: correctly report changes when rewriting an existing return (#1064)rector-downgrade-php ⬇️
DowngradeNeverTypeDeclarationRector: supportneverreturn types on arrow functions (#397)DowngradeReflectionMethodHasPrototypeRectorforReflectionMethod::hasPrototype()when downgrading below PHP 8.2 (#398)v2.6.6: Released Rector 2.6.6Compare Source
File selection
--filteroption to narrow processed files (#8419)New
--filteroption keeps only files whose path matches all given patterns. Repeat the option to require several patterns at once, handy for scoping a run to a subtree or a naming convention without editing config paths.Before: process every file under the given paths. After: process only files matching all
--filterpatterns.Bugfixes 🐛
RectorConfig::tag()as a no-op BC layer (#8431)TypeDeclarationDocblocks: fix invalid array-in-key docblock when narrowing long array unions (#8430)BetterPhpDocParser: keep import used only in an annotation array key (#8429)RenameVariableToMatchMethodCallReturnTypeRector: fix partial rename with same-named nested arrow param (#8428)ArrayFirstLastRector: skip nested compound assignment (#8425)ReturnTypeFromStrictNewArrayRector: add doc return type only for list and generic arrays (#8423), skip noisy array-shape union return docblock (#8422)Extension packages
rector-phpunit 🟢
AllowMockObjectsForDataProviderRector: skip dynamic method call (#781)AssertEmptyNullableObjectToAssertInstanceofRector: skipassertNull/assertEmpty(#780)AddSeeTestAnnotationRector: skip existing imported or short@seeannotation (#779)rector-downgrade-php ⬇️
DowngradeSetAccessibleReflectionPropertyRector: handlegetProperties()/getMethods()loop (#396)DowngradeHashAlgorithmXxHashRector: skipPHP_VERSION_IDguardedhash()calls (#394)Internal / cleanup
mspirkov/yii2-rectorlink to README (#8427)??expression (#8421)v2.6.5: Released Rector 2.6.5Compare Source
Caching
This release makes the cache smarter about config changes - fewer needless full re-runs, while still invalidating when results could actually differ.
Configured rule value changes now invalidate the cache (#8400)
withConfiguredRule()stored its config on theRectorConfiginstance only, never in the cache hash. Changing a rule's values - same class, different config - kept serving the stale result.return RectorConfig::configure() ->withConfiguredRule(SomeRector::class, [ - 'old value', + 'new value', ]);Before: cache kept, files re-analysed with stale value. After: cache dropped, re-analysed with new value. Merged config now flows through a
RULE_CONFIGURATIONSparameter into the strict cache hash. Upgrading invalidates the cache once for projects using configured rules.--only <Rule>reuses the full-run cache (#8400)Each
--onlyselection has its own cache namespace, so a file left clean by a prior full run was re-analysed under--onlyeven when nothing changed. A scoped run now falls back to the full-run cache (read only, file content still compared, so real edits are still picked up).Before:
--onlyre-analyses every file. After: skips files the full run already left clean.Directional cache invalidation on config change (#8397)
Previously any change to any config parameter dropped the whole cache. Now changes are compared by direction:
--parallel, memory limit, deprecation notices) -> never invalidatereturn RectorConfig::configure() ->withRules([ SomeRector::class, - OtherRector::class, // removing a rule -> cache kept ]);return RectorConfig::configure() ->withSkip([ SomeRector::class, + AnotherRector::class, // adding a skip -> cache kept ]);Before: full cache dropped, every file re-analysed. After: cache kept, only changed files re-analysed. A legacy cache value from an older version triggers a single safe reset.
Bugfixes 🐛
FunctionFirstClassCallableRector(#8398)IfToNullCoalescingAssignRector: fix isset guard never converting (#8389), keep comments aboveif(#8388), skip non-nullable typed property (#8387)InlineIfToExplicitIfRector: skip same local method call and call chain (#8417, #8418)ArrowFunctionDelegatingCallToFirstClassCallableRector: skip callee arity mismatch (#8391)Deprecations 💀
Rules:
ShortenElseIfRector(#8416)CombineIfRector(#8413)ExplicitBoolCompareRector- can make if-train less readable (#8412)SimplifyIfElseToTernaryRector- avoids less readable code (#8411)Sets and config:
SetList::IF- rules moved into code-quality and coding-style sets (#8414)SetList::INSTANCEOF- rules moved into code-quality and type-declaration sets (#8408)SetList::PHP_*constants - usewithPhpSets()/withPhpLevel()instead (#8405)withCacheMetaExtension()as@deprecated(#8415)withSetProviders()(#8392)Console commands:
list-rules(#8396),setup-ci(#8394),custom-rule(#8393)githubandgitlaboutput formats (#8390)Internal / cleanup
symplify/easy-parallelintosrc/Parallel(#8401)RectorCheaperGuardsFirstRulefromsymplify/phpstan-rules(#8404)SingleServiceRegistrationRule, drop unusedreact/promise(#8403)RelatedConfigInterface, dead stub files (#8395, #8407)v2.6.4: Released Rector 2.6.4Compare Source
A tooling release under the hood: Rector's dependency-injection container moves off
illuminate/containerontoentropy/entropy, and composer-based sets now target the lowest declared version of a library instead of guessing the current one.New rules 🎉
rector-src
IfToNullCoalescingAssignRector— convert anifnull-guard into??=(#8356)ArrayKeysToArrayKeyFirstLastRector—array_keys($a)[0]→array_key_first($a)(#8238)rector-symfony
WebLinkStringRelationsToConstantsRector(#1058)Engine 🔧
illuminate/containertoentropy/entropy(#8362) — lighter container, order-independent service collections viaautodiscover()projectpackage type is treated as an application (#8359, #8363)PhpVersionFactoryas a public service so third-party rules can autowire it (#8365)Bugfixes 🐛
rector-src
ClassMethodArrayDocblockParamFromLocalCallsRectoron methods overriding a parent/interface (#8357)@param arraywhen the local call type conflicts with the default value (#8381)oussuffix inRenameForeachValueVariableToMatchExprVariableRector(#8382)rector-symfony
CommandConfigureToAttributeRectoron non-constantconfigure()values (#1057)ContainerGetNameToTypeInTestsRectorwhen the named service has no matching FQCN service (#1051)OptionNameRectorwhen no option name changes (#1044)rector-phpunit
AddInstanceofAssertForNullableArgumentRectorduplicatingassertInstanceOfinside traits (#773)MatchAssertSameExpectedTypeRectorrewriting a passing assert into a failing one (#771)Set changes 📈
rector-src
FlipNegatedTernaryInstanceofRectorto the code quality level (#8385)rector-symfony
RequestIsMainRectorand other version-bonded rules to the composer-based set (#1048, #1045)GetFiltersAndFunctionsToAsTwigAttributeRector— support arrow-call functions; gate onsymfony/twig-bridge7.3, not twig alone (#1043, #1050)ANNOTATIONS_TO_ATTRIBUTESas@internalinstead of@deprecated(#1053)rector-doctrine
AddAnnotationToRepositoryRectorto the composer-based set only (#510)Deprecations 💀
Deprecated rules run without any effect, print a warning and will be removed in a future major release.
rector-symfony
InlineClassRoutePrefixRector(#1049)AddTraitGetterReturnTypeBasedOnSetterRequiredRector(#1047)LiteralGetToRequestClassConstantRector(#1046)Removals 💀
rector-src
CallLikeThisBoundClosureArgsNodeVisitorand its unread attribute (#8373)v2.6.3: Released Rector 2.6.3Compare Source
A stabilization release on top of the composer-based sets finished in 2.6.2 - bugfixes across the engine, a couple of fresh Symfony and Doctrine rules, and the caching cleanup that the
cacheClass()deprecation promised.New rules 🎉
rector-symfony
RouteRequirementStringToConstantRector(#1037)rector-doctrine
QueryBuilderExecuteToExecuteQueryOrExecuteStatementRector— split the deprecatedexecute()intoexecuteQuery()/executeStatement()(#507)Bugfixes 🐛
RemoveReturnTagIncompatibleWithNativeTypeRectoron a type alias nested in a union (#8319)breakas always terminated (#8348) — improves return/dead-code analysis onwhile (true)bodiesrector-symfony
InlineClassRoutePrefixRectorduplicating the route name prefix on attribute routes (#9851)PushRequestToRequestStackConstructorRectorleaving the pushed request undefined (#1040)loadValidatorMetadata()containingaddConstraint(new Callback())(#1038)rector-phpunit
AddDoesNotPerformAssertionToNonAssertingTestRector(#767)Set changes 📈
rector-doctrine
ORMSetupmethods —createAttributeMetadataConfiguration()→createAttributeMetadataConfig(),createXMLMetadataConfiguration()→createXMLMetadataConfig(),createConfiguration()→createConfig()Types::ARRAYwithTypes::SIMPLE_ARRAY(#506)Deprecations 💀
Deprecated rules run without any effect, print a warning and will be removed in a future major release.
rector-phpunit
AllowMockObjectsWithoutExpectationsAttributeRector— also removed from the setRemovals 💀
rector-src
MemoryCacheStorage, always useFileCacheStorage(#8354) — completes thecacheClass()deprecation from 2.6.2; only file cache is useful to end usersv2.6.2: Released Rector 2.6.2Compare Source
The 2.6.0 release introduced composer-based sets. This release finishes the job: every extension package now ships a single composer-based set, and the per-version set providers behind the old guessing game are gone.
Each rule inside checks
composer.json/installed.jsonon its own and runs only if the installed package version matches its constraint. NoSymfonySetList::SYMFONY_63, no picking a PHPUnit version by hand. We're working hard to bring Drupal and Laravel community packages to the same system.Run only the PHP rules (#8322)
A new
--phpoption on theprocesscommand runs only rules bound to a minimal PHP version — those implementingMinPhpVersionInterface. Useful to split a PHP upgrade from the rest, without a second config:New features 🥳
--phpoption to run only PHP version rules (#8322)withComposerBased()(#8332), load Doctrine and Twig composer-based sets (#8313)--onlyrule exists but is not registered inrector.php(#8300)New rules 🎉
rector-src
RemoveRedundantTypeCheckRector(#8307)rector-symfony
EnableValidationAttributesRector(#1004)Simple(Pre|Form)AuthenticatorInterfacefromCoretoHttpnamespace (#1031)rector-phpunit
AnyMatcherToNewAnyInvokedCountRectorfor the deprecatedany()matcher (#764)Bugfixes 🐛
withPhpSets()version (#8315) —withPhpSets(php82: true)withsymfony/polyfill-php83installed no longer produces PHP 8.3 codeInlineConstructorDefaultToPropertyRectoron non-final class (#8310) and on a property defined in the parent whenparent::__construct()is called (#8297)SimpleXMLElementonIssetOnPropertyObjectToPropertyExistsRector(#8284)RemoveParentDelegatingConstructorRectoron protected parent constructor (#8309)assert()enforcement that producesNeverTypeonNarrowWideUnionReturnTypeRector(#8282)AssignArrayToStringRectoron a variable re-assigned as string (#8293)ArrayToFirstClassCallableRectorwhen the arg type does not accept aClosure(#8288), drop the Symfony PHP closure check (#8291)Set changes 📈
DeprecatedAnnotationToDeprecatedAttributeRectorfrom the PHP 8.4 set and polyfills (#8326)AddOverrideAttributeToOverriddenMethodsRectorfrom the PHP 8.3 and polyfill sets (#8321)RemoveReadonlyPropertyVisibilityOnReadonlyClassRector(#8289),SimplifyBoolIdenticalTrueRectorandUnwrapSprintfOneArgumentRector(#8285) to the dead-code setPropertyExistsWithoutAssertRectorin the composer-based set (#761)Deprecations 💀
Deprecated rules run without any effect, and print a warning and will be removed in a future major release.
These were deprecated as not part of any set, risky, opinionated or excluded by most users. The goal is to keep Rector valuable and reliable for the every day user.
rector-src
DeprecatedAnnotationToDeprecatedAttributeRectorandConstAndTraitDeprecatedAttributeRector(#8347)AddInterfaceByTraitRector(#8346)RemoveAnnotationRector(#8345)ScalarValueToConstFetchRector(#8344)FuncCallToMethodCallRector(#8343)AddReturnArrayDocblockBasedOnArrayMapRector(#8342)AddAssertArrayFromClassMethodDocblockRector(#8341)AddParamArrayDocblockBasedOnArrayMapRector(#8340)AddReturnDocblockForDimFetchArrayFromAssignsRector(#8338)AddSensitiveParameterAttributeRector(#8337)PropertyHookRector— property hooks are a matter of preference (#8331)JsonThrowOnErrorRector— can cause BC breaks (#8327)CoalesceToTernaryRector— risky (#8324)ChangeNestedIfsToEarlyReturnRector(#8304),ChangeNestedForeachIfsToEarlyContinueRector(#8303),ReturnBinaryOrToEarlyReturnRector(#8302),ChangeOrIfContinueToMultiContinueRector(#8299)DisallowedEmptyRuleFixerRector(#8290)NestedFuncCallsToPipeOperatorRectorandSequentialAssignmentsToPipeOperatorRector(#8286)SwitchNegatedTernaryRector(#8283)cacheClass()— the file-vs-memory cache storage choice moved intoCacheFactory; onlyFileCacheStorageis ever useful to end users (#8311)symfonyRouteandsymfonyValidatorargs inwithAttributesSets()(#8317)ComposerTriggeredSetin favor ofComposerPackageConstraintInterface(#8296)withComposerBased(netteUtils:)argument (#8329)rector-symfony
ActionSuffixRemoverRector(#1022)ControllerMethodInjectionToConstructorRector(#1020)TraitGetByTypeToInjectRector(#1002)RemoveDefaultGetBlockPrefixRector(#1017)rector-doctrine
RemoveEmptyTableAttributeRector(#505)MoveCurrentDateTimeDefaultInEntityToConstructorRector, drop theforce_nullableoption (#504)Removals 💀
nette/utilsset and its singleUtilsJsonStaticCallNamedArgRectorrule (#8329) — the only third-party-library rule left in rector-src, readability onlyNewInInitializerRector(#8328)SymfonySetProvider,PHPUnitSetProvider(#8295) andDoctrineSetProvider(#8298) from the collectorTwigSetProvider(#1015) and the empty Symfony per-version set providers (#1012)PHPUnitSetProvider(#759)DoctrineSetProvider(#501), drop the unusedsymfony/yamldependency (#500)rectorphp/rector-symfony 🎵
AsTwigFilter/AsTwigFunctionrules into a single rule, addgetTests()support (#1027), restore the merged rules as deprecated (#1028)ControllerMethodInjectionToConstructorRector: re-use the parent protected property (#1003), skip event and session params (#1005), use#[Required]autowire()when the parent has a constructor (#1006), skip type-guarded classes and use a unique autowire method name (#1007), re-use an existing#[Required]method (#1008)LoadValidatorMetadataToAttributeRector: skip non-constant constraint args (#1000) and constraints without their own constructor (#1001)AddParamTypeDeclarationto nullable types where the upstream param defaults to null (#1023)GetRequestRector(#1013), move it to the Symfony 2.5 set (#1009)Twig_Tests_EnvironmentTest_Extensionrename (#1016)rectorphp/rector-phpunit 🧪
AddDoesNotPerformAssertionToNonAssertingTestRector: add the attribute directly and skip traits (#765), removeaddToAssertionCount()calls (#763), skip TwigIntegrationTestCasechildren (#762)v2.6.1: Released Rector 2.6.1Compare Source
Bugfix 🐛
composer-basedcommand on a lazy-initialized property, e.g. PHPStanUnionType::$normalized(#8280)Composer-based sets keep growing: Twig, nette/utils and the rest of Symfony 📦
Follow-up release to 2.6.0. The composer-based rollout continues - Twig and nette/utils join, and every remaining Symfony rule now declares the package version its target API was added in.
The new Twig composer-based set replaces the
twig112→twig127→ ... →twig30chain with a single set, where every rule checks the installedtwig/twigversion:final class SomeTwigUse { - public function run(Twig_Environment $twigEnvironment) + public function run(\Twig\Environment $twigEnvironment) { - return new Twig_SimpleFilter('some_filter', 'strlen'); + return new \Twig\TwigFilter('some_filter', 'strlen'); } }Package bonding (composer-based rollout) 📦
nette/utilsrules to the installed package version;nette-utils4.phpbecomescomposer-based.phpand is loaded as a single set (#8275)LoadValidatorMetadataToAttributeRectorin the composer-based set - the last interface-bonded rule left outside it (#997)ContainerInterfaceServiceToServiceContainerRectortosymfony/dependency-injection>=6.0 (#999)AddGetReferenceTypeRectortodoctrine/data-fixtures>=1.6 and the annotation-to-attribute sets to their package constraints (#497)RemoveExpectAnyFromMockRectorto PHPUnit 11+ (#756) ** landed in 2.6.0, missing from its release notes
The per-version sets are not touched - every rule stays registered where it was.
Set changes 📈
ConsistentImplodeRectorfrom the coding style level - the swappedimplode($array, $glue)signature was removed in PHP 8.0, so the rule belongs to thephp80set only, where it already is (#8273)DoctrineSetList::COMPOSER_BASEDconstant, remove the emptyDOCTRINE_BUNDLE_210set (#499)Bugfixes 🐛
AddParamArrayDocblockFromAssignsParamToParamReferenceRector(#8271)returninConsoleExecuteReturnIntRectoron a trailing comment (#992), plus a fixture for a block comment with a commented-out return (#993)(int)cast on amatchreturn inConsoleExecuteReturnIntRector- amatchof int constants is aUnionType, so theinstanceof IntegerTypecheck missed it (#998)public function execute(InputInterface $input, OutputInterface $output): int { - return (int) match ($input->getArgument('type')) { + return match ($input->getArgument('type')) { 'a' => 0, default => 1, }; }Deprecations 💀
Deprecated rules still run, but print a warning and will be removed in a future major release.
These are coding standard preferences or opinionated rewrites - a coding standard tool is the better place for them.
rector-src
WrapEncapsedVariableInCurlyBracesRector- also removed from the coding style level (#8272)function run($world) { - echo "Hello $world!"; + echo "Hello {$world}!"; }The actual PHP 8.2 deprecation,
${var}, is covered byVariableInStringInterpolationFixerRectorin thephp82set.CountArrayToEmptyArrayComparisonRector- also removed from the coding style level (#8274)ArraySpreadInsteadOfArrayMergeRector- the spread result is harder to read, and...mid-array looks dangerous in review (#8277)UnusedForeachValueToArrayKeysRector- also removed from the code quality level (#8278)rector-doctrine
GetRepositoryServiceLocatorToRepositoryServiceInjectionRector- it resolved the repository class by running a regular expression over the entity file contents (#498)Renames 🔄
ReplaceServiceArgumentRector→ContainerInterfaceServiceToServiceContainerRector, no longer configurable (#999)Both sets configured it with the same 2 values, for a single Symfony 6.0 BC break - the
Psr\Container\ContainerInterfaceandSymfony\...\DependencyInjection\ContainerInterfacealiases of theservice_containerservice were removed. Now hardcoded, and theReplaceServiceArgumentvalue object is gone.v2.6.0: Released Rector 2.6.0Compare Source
Composer-based sets - let Rector handle upgrade from
composer.json🥳The main theme of this release: rules that turn themselves on based on the package versions you actually have installed.
Instead of picking a Symfony or PHPUnit set by version number and guessing what applies, register the composer-based set once. Every rule inside checks
composer.json/installed.jsonand only runs if the installed package version matches its constraint.We're working on full coverage. At the moment, PHPUnit and Symfony rules are already migrated to this approach. Not only rules, but also rule configuration can be bound to a package version:
To see what is active and why, there is a new command:
And to run only those rules in a single process:
New features 🥳
ruleWithConfigurationComposerVersionBound()([#8244])composer-basedcommand ([#8246])--composer-basedprocess filter ([#8248])withComposerBased()([#8255])withComposerBased()([#8259])composer.json([#8264])New rules 🎉
rector-src
RemoveTestsOverriddenPrivateMethodParameterRector([#8254])rector-phpunit
AddIntersectionParamToMockObjectParamRector([#755])ExpectsParamToMockObjectRector— for private tConfiguration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.