[Conductor] Update dev#108
Open
private-packagist[bot] wants to merge 1 commit into
Open
Conversation
Conductor executed the following commands: composer update friendsofphp/php-cs-fixer:v3.95.15 rector/rector:2.5.7 --with-all-dependencies --minimal-changes
Contributor
Author
composer.lockDev Package changes
Settings · Docs · Powered by Private Packagist |
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 was automatically generated by Conductor.
The PR contains the changes generated by running the following command:
Changelog
friendsofphp/php-cs-fixer (Source: GitHub Releases))
v3.95.15
What's Changed
Full Changelog: v3.95.14...v3.95.15
v3.95.14
What's Changed
FunctionToConstantFixerby @kubawerlos in #9719ConfigurationResolverTest- fix types by @kubawerlos in #9725ClassDefinitionFixerTest- improve PHPDocs by @kubawerlos in #9726GeneralAttributeRemoveFixerTest- improve data provider types by @kubawerlos in #9727TrailingCommaInMultilineFixer- do not add trailing comma after first-class callable by @kubawerlos in #9722ClassAttributesSeparationFixer- handle property with hooks as last class element by @kubawerlos in #9724SingleClassElementPerStatementFixer- do not break PHP syntax when splitting properties with disjunctive normal form type by @kubawerlos in #9723ProjectCodeTest- improve PHPDocs by @kubawerlos in #9730Full Changelog: v3.95.13...v3.95.14
v3.95.13
What's Changed
SelfAccessorFixer- do not replace constant with same name as class in the middle of a static access chain by @kubawerlos in #9716SingleClassElementPerStatementFixer- do not drop type of typed constants by @kubawerlos in #9706Full Changelog: v3.95.12...v3.95.13
rector/rector (Source: GitHub Releases))
2.5.7
This release sharpens the PHPUnit code-quality sets, adds a focused narrow asserts set, deprecates two blurry Symfony web-test rules, and fixes a handful of docblock false-positives in dead-code removal.
New Features 🎉
PHPUnit:
PHPUNIT_NARROW_ASSERTSsetA new set focused on narrowing broad asserts to their specific, more descriptive method — e.g.
assertTrue(isset($a['b']))→assertArrayHasKey('b', $a). (rector-phpunit #716)withPreparedSets()gainsphpunitNarrowAsserts+phpunitMockToStubThe 2 PHPUnit sets are now toggleable like any other prepared set. (#8178)
PHPUnit: flip
with($this->callback(...))on void methods towillReturnCallback()VoidMethodWithCallbackToWillReturnCallbackRector(renamed + refocused) drops the pointlessreturnvalue and types the closure asvoid, matching the mocked void method. (rector-phpunit #724)$this->createMock(SomeClass::class) ->method('run') - ->with($this->callback(function ($arg) { - echo $arg; - - return true; - })); + ->willReturnCallback(function ($arg): void { + echo $arg; + });Console:
-vas alias for--versionSince the
verboseoption was removed,-vnow prints the version. (#8177)vendor/bin/rector -v # Rector 2.x.xImprovements 🔧
literal-string,numeric-string, …) to their real PHPStan types instead of a bogusObjectType, so precise docblocks survive dead-code cleanup (#8176)Assertclass via reflection before transforming (rector-phpunit #720)CallbackSingleAssertToSimplerRector(rector-phpunit #722)atLeast()instead ofexactly()inDecorateWillReturnMapWithExpectsMockRector(rector-phpunit #719)Bug Fixes 🐛
@returntags inRemoveReturnTagIncompatibleWithNativeTypeRector(#8183)RemoveReturnTagIncompatibleWithNativeTypeRector(#8180)RemoveReturnTagIncompatibleWithNativeTypeRector(#8179)CompleteDynamicPropertiesRector(#8182)@methodinRemoveExtraParametersRector(#8181)with()multiple arguments inVoidMethodWithCallbackToWillReturnCallbackRector(rector-phpunit #725)newobject instances inNarrowIdenticalWithConsecutiveRector— eachnewis a fresh instance, collapsing them changes intent (rector-phpunit #726)CallbackSingleAssertToSimplerRector(rector-phpunit #718)AssertEqualsToSameRectorto preserve loose comparison (rector-phpunit #717)Deprecations 💀
Symfony:
WebTestCaseAssertIsSuccessfulRector+WebTestCaseAssertResponseCodeRectorBoth rules hide the asserted behavior and force a different assert method per status code, splitting one clear assertion into several implicit ones. Asserting the HTTP status code directly is clearer and uniform. (rector-symfony #958)
2.5.6
New Features 🥳
RemoveReturnTagIncompatibleWithNativeTypeRector(#8172)final class SomeClass { - /** - * @return SomeObject - */ public function getName(): string { return $this->someObject->getName(); } }MergePhpstanDocTagIntoNativeRectorto merge@phpstan-*doc tags into native tags (#8171)final class SomeClass { /** - * @var Collection - * - * @phpstan-var Collection<int, string> + * @var Collection<int, string> */ private $items; }Bugfixes 🐛
NullToStrictStringFuncCallArgRector(#8164)getRuleDefinition()method, parts 1–5 (#8165, #8166, #8167, #8168, #8169)phpstan/phpdoc-parserto^2.3.3(#8174)PHPUnit 🧪
New rules and changes from rector-phpunit.
New Rules
AssertClassToThisAssertRector(#707)BareCreateMockAssignToDirectUseRector— inline a single-usecreateMock()assignment (#708)final class SomeTest extends TestCase { public function test() { - $someObject = $this->createMock(SomeClass::class); - $this->process($someObject); + $this->process($this->createMock(SomeClass::class)); }
}
WillReturnCallbackFallbackToThrowRector— throw on an unexpected extra consecutive call (#710)$this->someServiceMock->expects($matcher) ->method('run') ->willReturnCallback(function () use ($matcher) { if ($matcher->numberOfInvocations() === 1) { return 1; } + + throw new \PHPUnit\Framework\Exception(sprintf('Method should not be called for the %dth time', $matcher->numberOfInvocations())); });RemoveReturnFromVoidMethodMockCallbackRector— type a void mock callback and drop its value return (#711)$this->createMock(SomeClass::class) ->method('run') - ->willReturnCallback(function ($arg) { + ->willReturnCallback(function ($arg): void { echo $arg; - - return true; });(
SomeClass::run()returnsvoid.)CallbackSingleAssertToSimplerRector— collapse awith()callback with a soleassertSame()toequalTo()(#714)$builder->expects($this->exactly(2)) ->method('add') - ->with($this->callback(function ($type): bool { - $this->assertSame(TextType::class, $type); - - return true; - })); + ->with($this->equalTo(TextType::class));Improvements
TestCasesuffix classes inRemoveNeverUsedMockPropertyRector(#709)WithCallbackIdenticalToStandaloneAssertsRector(#712)return throwandreturn nullin void mock callbacks (#713)2.5.5
New Features 🥳
AlternativeIfToBracketRector(#8158)Bugfixes 🐛
AddClosureParamTypeForArrayMapRectorto type closure params from array values, not keys (#8163)Task options
If you close the PR, the task will be skipped and Conductor will schedule the next task. Clicking the "Skip" button in the UI has the same effect. Conductor won't attempt to update the dependency to this exact version again but it will schedule updates to newer versions.
Powered by Private Packagist