Skip to content

[Conductor] Update dev - #112

Merged
pscheit merged 1 commit into
mainfrom
conductor-multiple-vendors-all-84001
Aug 11, 2026
Merged

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

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 rector/rector:2.6.1 phpstan/phpstan:2.2.8 --with-all-dependencies --minimal-changes

Changelog

rector/rector (Source: GitHub Releases))

2.6.1

Bugfix 🐛

  • [composer-based] Fix fatal error in the composer-based command on a lazy-initialized property, e.g. PHPStan UnionType::$normalized (#​8280)
PHP Fatal error:  Uncaught Error: Typed property PHPStan\Type\UnionType::$normalized
must not be accessed before initialization in src/Console/Command/ComposerBasedCommand.php:205

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.

use Rector\Config\RectorConfig;

return RectorConfig::configure()
->withComposerBased(
doctrine: true,
netteUtils: true,
phpunit: true,
symfony: true,
twig: true,
);



The new Twig composer-based set replaces the twig112twig127 → ... → twig30 chain with a single set, where every rule checks the installed twig/twig version:

 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) 📦

  • [NetteUtils] Bind nette/utils rules to the installed package version; nette-utils4.php becomes composer-based.php and is loaded as a single set (#​8275)
  • [rector-symfony] Add Twig composer-based set (#​996)
  • [rector-symfony] Bond the remaining 48 Symfony rules to their composer package version (#​994)
  • [rector-symfony] Register LoadValidatorMetadataToAttributeRector in the composer-based set - the last interface-bonded rule left outside it (#​997)
  • [rector-symfony] Bond ContainerInterfaceServiceToServiceContainerRector to symfony/dependency-injection >=6.0 (#​999)
  • [rector-doctrine] Bond AddGetReferenceTypeRector to doctrine/data-fixtures >=1.6 and the annotation-to-attribute sets to their package constraints (#​497)
  • [rector-doctrine] Bond version-specific rules and configuration to composer package constraints (#​495) *
  • [rector-phpunit] Bond RemoveExpectAnyFromMockRector to 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 📈

  • [CodingStyle] Remove ConsistentImplodeRector from the coding style level - the swapped implode($array, $glue) signature was removed in PHP 8.0, so the rule belongs to the php80 set only, where it already is (#​8273)
  • [rector-doctrine] Add DoctrineSetList::COMPOSER_BASED constant, remove the empty DOCTRINE_BUNDLE_210 set (#​499)

Bugfixes 🐛

  • [TypeDeclarationDocblocks] Skip docblock reprint when nothing changed in AddParamArrayDocblockFromAssignsParamToParamReferenceRector (#​8271)
  • [rector-symfony] [Symfony44] Fix duplicated return in ConsoleExecuteReturnIntRector on a trailing comment (#​992), plus a fixture for a block comment with a commented-out return (#​993)
  • [rector-symfony] [Symfony44] Skip redundant (int) cast on a match return in ConsoleExecuteReturnIntRector - a match of int constants is a UnionType, so the instanceof IntegerType check 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 by VariableInStringInterpolationFixerRector in the php82 set.

  • CountArrayToEmptyArrayComparisonRector - also removed from the coding style level (#​8274)
-count($array) === 0;
-count($array) > 0;
+$array === [];
+$array !== [];
  • ArraySpreadInsteadOfArrayMergeRector - the spread result is harder to read, and ... mid-array looks dangerous in review (#​8277)
-$values = array_merge($firstValues, $secondValues);
+$values = [...$firstValues, ...$secondValues];
  • UnusedForeachValueToArrayKeysRector - also removed from the code quality level (#​8278)
-foreach ($values as $key => $value) {
+foreach (array_keys($values) as $key) {
     $items[$key] = null;
 }

rector-doctrine

  • GetRepositoryServiceLocatorToRepositoryServiceInjectionRector - it resolved the repository class by running a regular expression over the entity file contents (#​498)

Renames 🔄

  • [rector-symfony] ReplaceServiceArgumentRectorContainerInterfaceServiceToServiceContainerRector, no longer configurable (#​999)

Both sets configured it with the same 2 values, for a single Symfony 6.0 BC break - the Psr\Container\ContainerInterface and Symfony\...\DependencyInjection\ContainerInterface aliases of the service_container service were removed. Now hardcoded, and the ReplaceServiceArgument value object is gone.

 use function Symfony\Component\DependencyInjection\Loader\Configurator\service;

-return service(ContainerInterface::class);
+return service('service_container');



2.6.0

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.json and only runs if the installed package version matches its constraint.

use Rector\Config\RectorConfig;

return RectorConfig::configure()
->withComposerBased(
doctrine: true,
phpunit: true,
symfony: true,
twig: true,
);



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:

$rectorConfig->ruleWithConfigurationComposerVersionBound(
    SomeRector::class,
    [...],
    'phpunit/phpunit',
    '>=11.0'
);

To see what is active and why, there is a new command:

vendor/bin/rector composer-based
 Composer package bound rules
 ------------------------------- ----------------- ---------- ----------- --------
  Rule                            Package           Requires   Installed   Active
 ------------------------------- ----------------- ---------- ----------- --------
  RemoveExpectAnyFromMockRector   phpunit/phpunit   >=11.0     11.5.2      yes
  RedirectToRouteRector           symfony/...       >=2.6      7.2.1       yes
 ------------------------------- ----------------- ---------- ----------- --------

! [NOTE] 2 of 2 composer package bound items are active



And to run only those rules in a single process:

vendor/bin/rector process --composer-based

New features 🥳

  • [Config] Add ruleWithConfigurationComposerVersionBound() (#​8244)
  • [composer-based] Add composer-based command (#​8246)
  • [composer-based] Report rule configuration bound to installed package version (#​8247)
  • [composer-based] Register each rule only once, add --composer-based process filter (#​8248)
  • [Configuration] Load single composer-based PHPUnit set in withComposerBased() (#​8255)
  • [Configuration] Load single composer-based Symfony set in withComposerBased() (#​8259)
  • [Console] Print composer-based rule configuration on separate full-width line (#​8256)
  • [Testing] Allow a test case to resolve package versions from a standalone composer.json (#​8264)

New rules 🎉

rector-src

  • [DeadCode] RemoveTestsOverriddenPrivateMethodParameterRector (#​8254)

rector-phpunit

  • [CodeQuality] AddIntersectionParamToMockObjectParamRector (#​755)
  • [PHPUnit 11.0] ExpectsParamToMockObjectRector — for private test method params (#​753)
  • [PHPUnit 11.0] MockObjectArgCreateStubToCreateMockRector (#​741)
  • [PHPUnit 11.5] AssertContainsOnlyMethodCallRector (#​738)

rector-symfony

  • [CodeQuality] LoadValidatorMetadataToAttributeRector (#​988)

Bugfixes 🐛

  • [DeadCode] Skip RecastingRemovalRector on array dim fetch value (#​8262)
  • [DeadCode] Skip RemoveDefaultValueFromAssignedPropertyRector on early return in constructor-called method (#​8261)
  • [DeadCode] Skip static property in RemoveDefaultValueFromAssignedPropertyRector (#​8240)
  • [DeadCode] Remove whole assign statement on unused createStub() in tests (#​8257)
  • [NodeAnalyzer] Detect always terminated stmts with statements before the return (#​8260)
  • [Configuration] Resolve --only rule name with shell-eaten backslashes (#​8267)
  • [rector-symfony] Add try/catch fixtures with statements before the return (#​986)
# before: quotes were needed to match rule
vendor/bin/rector p --only="\Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector"

# after: simple class name works as well
vendor/bin/rector p --only \Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector

  • [Composer] Prefer composer.json constraint over outdated installed.json version (#​8242)
  • Fix InstalledPackageResolver cwd fallback lost by promoted property (#​8237)
  • [rector-phpunit] Fix swapped preCondition and postCondition attribute mapping (#​746)
  • [rector-phpunit] Handle test traits in DataProviderAnnotationToAttributeRector (#​751, #​752)

Set changes 📈

  • [Config] Move 3 rules from coding style set to their proper sets — ExplicitPublicClassMethodRector to PHP 5.3, plus one each to code quality and dead code (#​8266)
  • [CodingStyle] Remove MinMaxToClampRector from coding style level (#​8270)
  • [rector-symfony] Add SymfonySetList::COMPOSER_BASED (#​982)
  • [rector-phpunit] Register composer-based set in PHPUnitSetProvider (#​748)

Deprecations 💀

Deprecated rules still run, but print a w 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. Goal is to make Rector useful more to masses and every day user by having valuable and reliable rules.

rector-src

  • EncapsedStringsToSprintfRector (#​8265)
  • SimplifyRegexPatternRector (#​8263)
  • BinaryOpStandaloneAssignsToDirectRector (#​8269)
  • NullableCompareToNullRector (#​8268)
  • NestedTernaryToMatchRector (#​8241)
  • AddReturnDocblockFromMethodCallDocblockRector (#​8239)
  • Gmagick to Imagick set (#​8252)
  • withPhp53Sets() ... withPhp74Sets() — use withPhpLevel() instead (#​8253)
  • cacheMetaExtension() — reports a warning when used (#​8251)

rector-doctrine

  • YamlToAttributeDoctrineMappingRector (#​492)
  • DoctrineSetList::YAML_TO_ANNOTATIONS set (#​493)

rector-symfony

  • TemplateAnnotationToThisRenderRector (#​989)
  • ReturnDirectJsonResponseRector (#​987)
  • AutowireAttributeRector (#​981)

rector-phpunit

  • WillReturnCallbackFallbackToThrowRector (#​740)
  • ReplaceTestFunctionPrefixWithAttributeRector (#​739)

Removals 💀

  • [depre] Remove strict-booleans set, deprecated since 2025-10 (#​8243)
  • [ChangesReporting] Remove junit output format (#​8250)
  • [rector-doctrine] Remove DoctrineDocBlockResolver, deprecated since 2025-05 (#​491)
  • [rector-symfony] Remove StringExtensionToConfigBuilderRector, deprecated since 2025-10 (#​978)
  • [rector-phpunit] Remove 4 rules deprecated since 2025-10 (#​743)
  • [rector-phpunit] Remove deprecated AssertPropertyExistsRector (#​742)

Package bonding (composer-based rollout)

  • [rector-symfony] Bond version-specific rules to composer package constraints (#​979), include all configured rules in the composer-based set (#​980), bond AddViolationToBuildViolationRector to symfony/validator 2.5 (#​983), add AuthorizationCheckerIsGrantedExtractorRector to the composer-based set (#​985), bond RedirectToRouteRector to symfony/framework-bundle 2.6 (#​991)
  • [rector-phpunit] Bond version-specific rules to composer package constraints (#​754), bond stub and mock rules to phpunit/phpunit >=11.0 (#​750), bond annotation-to-attribute rules to phpunit/phpunit >=10.0 (#​744, #​745), move composer version bound rules to composer-based set (#​747)

phpstan/phpstan (Source: GitHub Releases)

2.2.8

Bugfixes 🐛

Performance 🏎️

Function signature fixes 🤖

  • Make ReflectionObject, RecursiveFilterIterator, ParentIterator, RecursiveCachingIterator and RecursiveRegexIterator generic in stubs (#​6165), #​15032

Internals 🔍

  • Resolve isset/empty/?? chains from handler-built descriptors (#​6144)
  • Split processAssignVar into prepareTarget and applyWrite, compose the ??= read (#​6144)
  • Walk the dynamic variable name once, drop the vestigial clone walks (#​6144)
  • Add parameter closure type extensions for array_map, array_filter, array_walk, array_find (#​6147)
  • Resolve the native flavour of closure parameters through parameter closure type extensions (#​6147)
  • Derive ArrayAccess and __set simulation throw points directly instead of walking synthetic calls (#​6148)
  • Extract the intrinsic closure-parameter blocks into ParametersAcceptorSelector::applyIntrinsicArgOverrides() (#​6149)
  • Derive expression-statement exit points from the never type (#​6150)
  • Reference the original chain in ExistingArrayDimFetch, delete DeepNodeCloner (#​6151)
  • Let the compositional-key shortcut clear virtual-node keys on the invalidated side (#​6154)
  • Do not extend Expr in the isset/empty/coalesce rule-facing virtual nodes (#​6155)
  • Add ShellExecHandler and IssetExprHandler (#​6156)
  • Run the impossible-check and nullsafe rules on post-processing virtual nodes (#​6157)
  • Process call arguments in a single pass with type-driven acceptor selection (#​6158)
  • Improve #[InstanceofDeprecated] message of EnumCaseObjectType (#​6159), thanks @​staabm!
  • Check yield operand voidness through getKeepVoidType() (#​6161)
  • Drop redundant @​internal on hasAcceptorTemplateOrLateResolvableParameterType (#​6161)
  • Pass the iteratee type into enterForeach() and enterForeachKey() (#​6162)
  • Resolve intertwined by-ref slot types from the just-assigned root type (#​6162)
  • Filter FiberScope state in the falsey direction and carry both filter lists (#​6164)
  • Check destructured @​var items against the native offset type (#​6164)
  • Defer match arm comparison errors only for match(true)-style subjects (#​6164)
  • Scope deferred constant-condition errors and markers per file (#​6164)
  • Add deferred SpecifiedTypes machinery evaluated at the application point (#​6163), #​14908, #​14966
  • Defer boolean-decomposition holder math to the application point (#​6163)
  • Add regression test for #​14908 (#​6163)
  • Do not derive holder antecedents from truthy narrowing weaker than the truth (#​6163)
  • Specify expression types in place on an unpublished working copy (#​6168)
  • Use a complete version constraint in FiniteTypeSetTest's RequiresPhp attribute (#​6177), thanks @​SanderMuller!
  • Harden the turbo-token-numbering job against zizmor findings (#​6180), #​15037, #​15043
  • Harden phar.yml per zizmor across all jobs (#​6180), #​15037, #​15043

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 rector/rector:2.6.1 phpstan/phpstan:2.2.8 --with-all-dependencies --minimal-changes
@private-packagist

Copy link
Copy Markdown
Contributor Author

composer.lock

Dev Package changes

Package Operation From To About
phpstan/phpstan upgrade 2.2.7 2.2.8 diff
rector/rector upgrade 2.5.9 2.6.1 diff

Settings · Docs · Powered by Private Packagist

@pscheit
pscheit merged commit 6aacbbc into main Aug 11, 2026
1 check passed
@private-packagist
private-packagist Bot deleted the conductor-multiple-vendors-all-84001 branch August 11, 2026 09:15
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