Skip to content

[Conductor] Update dev#107

Merged
pscheit merged 1 commit into
mainfrom
conductor-multiple-vendors-all-80430
Jul 9, 2026
Merged

[Conductor] Update dev#107
pscheit merged 1 commit into
mainfrom
conductor-multiple-vendors-all-80430

Conversation

@private-packagist

Copy link
Copy Markdown
Contributor

This PR was automatically generated by Conductor.

The PR contains the changes generated by running the following command:

composer update friendsofphp/php-cs-fixer:v3.95.12 phpstan/phpstan:2.2.5 phpstan/phpstan-phpunit:2.0.18 phpunit/phpunit:10.5.64 rector/rector:2.5.4 --with-all-dependencies --minimal-changes

Changelog

friendsofphp/php-cs-fixer (Source: GitHub Releases))

v3.95.12

What's Changed

Full Changelog: v3.95.11...v3.95.12

phpstan/phpstan (Source: GitHub Releases)

2.2.5

Improvements 🔧

Bugfixes 🐛

  • Allow null values in native preg_replace_callback callback array type for PREG_UNMATCHED_AS_NULL (#​5987), #​14904, thanks @​staabm!

Performance 🏎️

  • Restore process-wide statics from the main container after stub validation (#​5984)
  • Drop the container reference in LazyClassReflectionExtensionRegistryProvider after building the registry (#​5985)
  • Replace PhpClassReflectionExtension::evictPrivateSymbols() with a shared LRU over the member caches (#​5986)
  • Make the member cache LRU limit configurable as cache.memberCacheKeysMax (#​5986)
  • LRU-cap resolved local type aliases in UsefulTypeAliasResolver (#​5989)
  • Make the cap configurable via cache.resolvedLocalTypeAliasesCountMax (#​5989)
  • Raise CachedParser source-byte cap to 4 MB, add eviction floor, make it configurable (phpstan/phpstan-src@​354e926)
  • Give CachedParser $cachedSourceBytesMax a default value (phpstan/phpstan-src@​fa1003a)
  • Flatten deep BooleanOr chains in resolveType() to avoid O(n^2) scope narrowing (#​5992), #​14477, thanks @​SanderMuller!
  • Cache per-guard isSuperTypeOf() results in createConditionalExpressions() instead of recomputing them per target (#​6001), #​14920
  • Skip constant-array guards when creating conditional expressions for subtype-absorbed targets (#​6002), #​14921
  • Compute ConstantArrayType sealed-shape isSuperTypeOf() reasons lazily via IsSuperTypeOfResult closures (#​6003), #​14918
  • Memoize the ExprHandler lookup by Expr class in specifyTypesInCondition() and processExprNode() (#​5999), #​14919

Function signature fixes 🤖

Internals 🔍

2.2.4

PHPStan addresses the RAMpocalypse! It now consumes a lot less memory. See for yourself by running analyse -v.

E.g. running PHPStan on itself went from 2.8 GB to 2.1 GB total consumed memory across worker processes.

Bugfixes 🐛

Performance 🏎️

  • PackageDependencyResolver: memoize resolvePackage per file (#​5961), thanks @​SanderMuller!
  • Evict parser and PHPDoc name-scope caches by LRU instead of FIFO (#​5965)
  • Remove custom isSuperTypeOf reasons from ObjectType (#​5968), #​14896
  • Restore value sharing in name scope maps hydrated from the file cache (#​5969)
  • Cap CachedParser by total cached source size (#​5969)
  • Keep a single memoization layer for located reflections (#​5974)
  • Stream the result cache to disk instead of building it in memory (phpstan/phpstan-src@​ee9fe9e)

Internals 🔍

phpstan/phpstan-phpunit (Source: GitHub Releases))

2.0.18

  • f5dc20f - Fix #[RequiresPhpunit] version requirement being evaluated against PHP version (#​313)
  • 1e573d3 - AttributeVersionRequirementHelper: add defaults to bool parameters (#​312)
phpunit/phpunit (Source: GitHub Releases))

10.5.64

Changed

  • #​6797: Adapt code generated for test double of interface with constructor for PHP 8.6

Learn how to install or update PHPUnit 10.5 in the documentation.

Keep up to date with PHPUnit:

rector/rector (Source: GitHub Releases))

2.5.4

New Features 🥳

  • [TypeDeclaration] Add ReturnTypeFromGetRepositoryDocblockRector (#​8146)

Bugfixes 🐛

  • [DeadCode] Keep generic @​ var/@​ return self<...> narrowing annotations (#​8147)
  • [TypeDeclaration] Handle getRepository() return via local variable in ReturnTypeFromGetRepositoryDocblockRector (#​8148)

2.5.3

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)

return RectorConfig::configure()
    ->withTypeGuardedClasses([SomeContract::class]);

New Rules 🎉

NegatedAndsToPositiveOrsRector

(CodeQuality) — simplify a negated "and" to "or" via de Morgan (#​8082)

 $a = 5;
 $b = 10;
-$result = !($a > 20 && $b <= 50);
+$result = $a <= 20 || $b > 50;

ExplicitAttributeNamedArgsRector

(CodeQuality) — positional attribute args → named args (#​8079), Thanks @​DaveLiddament!

-#[SomeAttribute(SomeClass::class, null, ['home'])]
+#[SomeAttribute(value: SomeClass::class, only: null, except: ['home'])]
 class SomeClass
 {
 }

SwitchTrueToMatchRector

(CodeQuality) — switch (true) of returning cases → match (true), replaces deprecated SwitchTrueToIfRector (#​8113)

-        switch (true) {
-            case $value === 0:
-                return 'no';
-            case $value === 1:
-                return 'yes';
-            default:
-                return 'maybe';
-        }
+        return match (true) {
+            $value === 0 => 'no',
+            $value === 1 => 'yes',
+            default => 'maybe',
+        };

RemoveDuplicatedReturnSelfDocblockRector

(DeadCode) — drop @​return duplicating native self/static (#​8087)

 final class SomeClass
 {
-    /**
-     * @​return $this
-     */
     public function some(): self
     {
         return $this;
     }
 }

RemoveMixedDocblockOverruledByNativeTypeRector

(DeadCode) — drop @​param mixed / @​return mixed overruled by native type (#​8089)

-    /**
-     * @​param mixed $value
-     * @​return mixed
-     */
     public function run(int $value): string
     {
     }

RemoveUselessUnionReturnDocblockRector

(DeadCode) — drop @​return union broader than a specific native type (#​8126)

-    /**
-     * @​return bool|mixed|string
-     */
     public function run(): false|string
     {
     }

ClosureReturnTypeFromAssertInstanceOfRector

(TypeDeclaration) — add closure return type narrowed by assertInstanceOf() (#​8115)

-        $callback = function (object $object) {
+        $callback = function (object $object): SomeType {
             $this->assertInstanceOf(SomeType::class, $object);
         return $object;
     };</pre>

TypedPropertyFromContainerGetSetUpRector

(TypeDeclaration) — type property from @​var when assigned via container get() in setUp() (#​8120)

-    /**
-     * @​var SomeService
-     */
-    private $someService;
+    private SomeService $someService;
 protected function setUp(): void
 {
     $this-&gt;someService = static::getContainer()-&gt;get(SomeService::class);
 }</pre>

TypedPropertyFromGetRepositorySetUpRector

(TypeDeclaration) — same, for getRepository() assignment in setUp() (#​8124)

-    /**
-     * @​var SomeEntityRepository
-     */
-    private $someEntityRepository;
+    private SomeEntityRepository $someEntityRepository;
 protected function setUp(): void
 {
     $this-&gt;someEntityRepository = $this-&gt;em-&gt;getRepository(SomeEntity::class);
 }</pre>

NarrowBoolDocblockReturnTypeRector

(TypeDeclaration) — narrow @​return bool to false/true per native type (#​8127)

     /**
-     * @​return bool|string[]
+     * @​return false|string[]
      */
     public function run(): false|array

NarrowArrayCollectionUnionReturnDocblockRector

(TypeDeclarationDocblocks) — Type[]|ArrayCollection → generic ArrayCollection<int, Type> (#​8136)

     /**
-     * @​return LeadEventLog[]|ArrayCollection
+     * @​return ArrayCollection<int, LeadEventLog>
      */
     public function getSuccessful(): ArrayCollection

AddClosureParamTypeFromVariableCallRector

(TypeDeclaration) — add closure param type from how the closure variable is called (#​8142)

-$printItem = function ($item) {
+$printItem = function (Item $item) {
     echo $item->name;
 };

$printItem(new Item());



rectorphp/rector-symfony 🎵

EventSubscriberMethodReturnVoidRector

(CodeQuality) — subscribed event methods must return void (event is by-reference) (#​949)

-    public function onEvent(Event $event): Event
+    public function onEvent(Event $event): void
     {
-        return $event->setSomething('value');
+        $event->setSomething('value');
     }

rectorphp/rector-phpunit 🟢

PHPUnit 12 cluster — typing createMock() / createStub() properties as intersections after the MockObjectStub split.

ChangeMockObjectReturnUnionToIntersectionRector

(CodeQuality) — MockObject @​return union → intersection (#​703)

     /**
-     * @​return Event|\PHPUnit\Framework\MockObject\MockObject
+     * @​return Event&\PHPUnit\Framework\MockObject\MockObject
      */
     private function createEvent(): \PHPUnit\Framework\MockObject\MockObject

AddIntersectionVarToMockObjectPropertyRector

(CodeQuality) — add MockObject intersection @​var to a native MockObject property (#​697)

+    /**
+     * @​var \PHPUnit\Framework\MockObject\MockObject&\SomeService
+     */
     private \PHPUnit\Framework\MockObject\MockObject $someServiceMock;

AddStubIntersectionVarToStubPropertyRector

(CodeQuality) — add Stub intersection @​var to a native Stub property (#​700)

+    /**
+     * @​var \PHPUnit\Framework\MockObject\Stub&\SomeService
+     */
     private \PHPUnit\Framework\MockObject\Stub $someServiceStub;

MockObjectVarToStubRector

(PHPUnit120) — on a property retyped to Stub, update @​var from MockObject to Stub (#​689)

 /**
- * @​var FieldModel|MockObject
+ * @​var FieldModel|\PHPUnit\Framework\MockObject\Stub
  */
 private \PHPUnit\Framework\MockObject\Stub $leadFieldModel;

BareVarToStubIntersectionRector

(PHPUnit120) — add &Stub to a bare single-class @​var of a Stub property (#​690)

 /**
- * @​var FormBuilderInterface
+ * @​var FormBuilderInterface&Stub
  */
 private \PHPUnit\Framework\MockObject\Stub $formBuilder;

PreferTestsWithCamelCaseRector

(CodeQuality) — rename PHPUnit test methods to camelCase (#​668), Thanks @​Xammie!

-    public function test_something()
+    public function testSomething()
     {
     }

PreferTestsWithSnakeCaseRector

(CodeQuality) — rename PHPUnit test methods to snake_case, the opposite convention (#​668), Thanks @​Xammie!

-    public function testSomething()
+    public function test_something()
     {
     }

Bugfixes 🐛

  • --only / --only-suffix runs now cache under a rule-scoped key (#​8075), Thanks @​SanderMuller!
  • Fix double clear-cache (#​8096)
  • ParamTypeByMethodCallTypeRector split into Object / Scalar / Array rules (#​8134)

Deprecations & Removals 💀

Migrate away - these will be removed in a future release:

  • SwitchTrueToIfRector → use new SwitchTrueToMatchRector (#​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)
  • Removed: long-deprecated rules (5+ months old) (#​8094)

rectorphp/rector-symfony

  • ParameterBagToAutowireAttributeRector (#​954)
  • AddRouteAnnotationRector (#​952)

rectorphp/rector-phpunit

  • BehatPHPUnitAssertToWebmozartRector — too narrow (#​686)

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

Conductor executed the following commands:
composer update friendsofphp/php-cs-fixer:v3.95.12 phpstan/phpstan:2.2.5 phpstan/phpstan-phpunit:2.0.18 phpunit/phpunit:10.5.64 rector/rector:2.5.4 --with-all-dependencies --minimal-changes
@private-packagist

Copy link
Copy Markdown
Contributor Author

composer.lock

Dev Package changes

Package Operation From To About
friendsofphp/php-cs-fixer upgrade v3.95.11 v3.95.12 diff
phpstan/phpstan upgrade 2.2.3 2.2.5 diff
phpstan/phpstan-phpunit upgrade 2.0.17 2.0.18 diff
phpunit/phpunit upgrade 10.5.63 10.5.64 diff
rector/rector upgrade 2.5.2 2.5.4 diff

Settings · Docs · Powered by Private Packagist

@pscheit pscheit merged commit 89d6071 into main Jul 9, 2026
1 check passed
@private-packagist private-packagist Bot deleted the conductor-multiple-vendors-all-80430 branch July 9, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant