chore(deps): update dependency rector/rector to v2.5.4#455
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency rector/rector to v2.5.4#455renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
90d3aeb to
6d31bb7
Compare
6d31bb7 to
130b2ee
Compare
130b2ee to
a3a29a9
Compare
ded2787 to
6714d86
Compare
6714d86 to
fc8ba3f
Compare
fc8ba3f to
91f58ed
Compare
670d92f to
46bbda9
Compare
46bbda9 to
9cbcd1e
Compare
Minimum allowed line rate is |
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.4.5→2.5.4Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
rectorphp/rector (rector/rector)
v2.5.4: Released Rector 2.5.4Compare Source
New Features 🥳
Bugfixes 🐛
v2.5.3: Released Rector 2.5.3Compare Source
New Features 🥳
withTypeGuardedClasses()Are you an open-source project or package used by others? Do you want to make type changes, but keep BC?
Guard the listed classes and their non-final descendants against method signature changes - e.g. adding a return type or a param type — that would break child classes (#8135)
New Rules 🎉
NegatedAndsToPositiveOrsRector(CodeQuality) — simplify a negated "and" to "or" via de Morgan (#8082)
ExplicitAttributeNamedArgsRector(CodeQuality) — positional attribute args → named args (#8079), Thanks @DaveLiddament!
SwitchTrueToMatchRector(CodeQuality) —
switch (true)of returning cases →match (true), replaces deprecatedSwitchTrueToIfRector(#8113)RemoveDuplicatedReturnSelfDocblockRector(DeadCode) — drop
@returnduplicating native self/static (#8087)final class SomeClass { - /** - * @​return $this - */ public function some(): self { return $this; } }RemoveMixedDocblockOverruledByNativeTypeRector(DeadCode) — drop
@param mixed/@return mixedoverruled by native type (#8089)RemoveUselessUnionReturnDocblockRector(DeadCode) — drop
@returnunion broader than a specific native type (#8126)ClosureReturnTypeFromAssertInstanceOfRector(TypeDeclaration) — add closure return type narrowed by
assertInstanceOf()(#8115)TypedPropertyFromContainerGetSetUpRector(TypeDeclaration) — type property from
@varwhen assigned via containerget()insetUp()(#8120)TypedPropertyFromGetRepositorySetUpRector(TypeDeclaration) — same, for
getRepository()assignment insetUp()(#8124)protected function setUp(): void
{
$this->someEntityRepository = $this->em->getRepository(SomeEntity::class);
}
NarrowBoolDocblockReturnTypeRector(TypeDeclaration) — narrow
@return booltofalse/trueper native type (#8127)NarrowArrayCollectionUnionReturnDocblockRector(TypeDeclarationDocblocks) —
Type[]|ArrayCollection→ genericArrayCollection<int, Type>(#8136)AddClosureParamTypeFromVariableCallRector(TypeDeclaration) — add closure param type from how the closure variable is called (#8142)
rectorphp/rector-symfony 🎵
EventSubscriberMethodReturnVoidRector(CodeQuality) — subscribed event methods must return
void(event is by-reference) (#949)rectorphp/rector-phpunit 🟢
PHPUnit 12 cluster — typing
createMock()/createStub()properties as intersections after theMockObject→Stubsplit.ChangeMockObjectReturnUnionToIntersectionRector(CodeQuality) — MockObject
@returnunion → intersection (#703)AddIntersectionVarToMockObjectPropertyRector(CodeQuality) — add MockObject intersection
@varto a native MockObject property (#697)AddStubIntersectionVarToStubPropertyRector(CodeQuality) — add Stub intersection
@varto a native Stub property (#700)MockObjectVarToStubRector(PHPUnit120) — on a property retyped to Stub, update
@varfrom MockObject to Stub (#689)BareVarToStubIntersectionRector(PHPUnit120) — add
&Stubto a bare single-class@varof a Stub property (#690)PreferTestsWithCamelCaseRector(CodeQuality) — rename PHPUnit test methods to camelCase (#668), Thanks @Xammie!
PreferTestsWithSnakeCaseRector(CodeQuality) — rename PHPUnit test methods to snake_case, the opposite convention (#668), Thanks @Xammie!
Bugfixes 🐛
--only/--only-suffixruns now cache under a rule-scoped key (#8075), Thanks @SanderMuller!ParamTypeByMethodCallTypeRectorsplit into Object / Scalar / Array rules (#8134)Deprecations & Removals 💀
Migrate away - these will be removed in a future release:
SwitchTrueToIfRector→ use newSwitchTrueToMatchRector(#8109)StrictStringParamConcatRector— too many false positives (#8090)StaticClosureRector+StaticArrowFunctionRector(#8092)StaticCallOnNonStaticToInstanceCallRector— risky change (#8093)EnumCaseToPascalCaseRector— risky change (#8095)JoinStringConcatRector(#8107)RemoveTypedPropertyNonMockDocblockRector— no real value (#8119)rectorphp/rector-symfony
ParameterBagToAutowireAttributeRector(#954)AddRouteAnnotationRector(#952)rectorphp/rector-phpunit
BehatPHPUnitAssertToWebmozartRector— too narrow (#686)v2.5.2: Released Rector 2.5.2Compare Source
Bugfixes 🐛
class => [paths]skips being wrongly flagged as unused (#8073)class => [paths]map — richer per-path skip tracking backing the report (#8074)v2.5.1: Released Rector 2.5.1Compare Source
Bugfixes 🐛
RemoveAlwaysTrueIfConditionRector— avoid scanning whole new statements on dynamic variable checks; moved logic toExprAnalyzerand bail early on defined variables (#8057)v2.5.0: Released Rector 2.5Compare Source
New Features 🥳 🎉 🎉 🎉
This release has 3 interesting new features. Let's look at them:
[dx] Report skips that never matched (#8058)
What? - like PHPStan's
reportUnusedIgnores, but for Rector->withSkip(). Flags skip entries that never matched anything during the run, so you can delete stale skips.Why? - skips rot. You skip a path/rule to dodge a problem, later the file moves or the rule stops firing there — the skip lingers forever,
silently masking nothing. This surfaces dead skips so config stays honest.
Run output:
[dx] Removing unused imports by default (#8047)
You can update your
rector.phpconfig:In case it's not for you, turn it off:
[dx] Introducing Drupal composer-based sets (#8041), Thanks @bbrala!
If you're using Drupal Rector, you can now enable it's per-version sets via:
return RectorConfig::configure() + ->withComposerBased(drupal: true);To learn more about composer-based-sets, checkout the documentation.
New Rules 🎉
AddArrayAnyAllClosureParamTypeRectorandNarrowArrayAnyAllNullableParamTypeRector(#8049)MoveInnerFunctionToTopLevelRector(#8042)NewArrayItemConcatAssignToAssignRector(#8045)FixClassCaseSensitivityVarDocblockRector(#8046)AddParamTypeToRefactorMethodRectorif missing (#8061)Bugfixes 🐛
MoveInnerFunctionToTopLevelRector(#8044)--onlyruns caching files as unchanged, hiding pending changes from full runs (#8029), Thanks @SanderMuller!RemoveUnusedPrivateMethodRectorfor NeverType (#8050)rectorphp/rector-doctrine 🟠
v2.4.6: Released Rector 2.4.6Compare Source
New Features 🥳
Bugfixes 🐛
--autoload-file(#8034), Thanks @SanderMuller!rectorphp/rector-symfony 🎶
rectorphp/rector-phpunit 🟢
rectorphp/rector-downgrade-php ⬇️
Configuration
📅 Schedule: (UTC)
* * * * 0,6)🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.