Skip to content

Comments

build(deps-dev): bump rector/rector from 2.3.0 to 2.3.1#5236

Open
dependabot[bot] wants to merge 2 commits intomainfrom
dependabot/composer/rector/rector-2.3.1
Open

build(deps-dev): bump rector/rector from 2.3.0 to 2.3.1#5236
dependabot[bot] wants to merge 2 commits intomainfrom
dependabot/composer/rector/rector-2.3.1

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 19, 2026

Bumps rector/rector from 2.3.0 to 2.3.1.

Release notes

Sourced from rector/rector's releases.

Released Rector 2.3.1

New Features and Changes 🥳

  • [tdd] Add AddReturnDocblockForDimFetchArrayFromAssignsRector (#7792)
  • [tdd] Add AddReturnDocblockFromMethodCallDocblockRector (#7796)
  • [tdd] Add AddVarArrayDocblockFromDimFetchAssignRector (#7801)
  • [DeadCode] Add RemoveDeadIfBlocksRector (#7528), Thanks @​john-shaffer!
  • [dead-code] Add RemoveVoidDocblockFromMagicMethodRector (#7822) - Thanks @​parijke!
  • [experiment] Remove leaveNode() method on AbstractRector and CallableNodeVisitor (#7767)

Bugfixes 🐛

  • Skip Doctrine Connection calls in AddReturnDocblockFromMethodCallDocblockRector (#7797)
  • add static all support to AddReturnDocblockFromMethodCallDocblockRector (#7798)
  • add object support to DocblockReturnArrayFromDirectArrayInstanceRector (#7795)
  • [TypeDeclarationDocblocks] Use FQCN return docblock for array of object types on AddReturnDocblockFromMethodCallDocblockRector (#7800), Thanks @​guanguans!
  • [php 8.3] cover private abstract constants in AddTypeToConstRector (#7804)
  • Add check for append in foreach items assignment (#7815), Thanks @​solverat!
  • Static closure rule ignores arguments with $this binding (#7721), Thanks @​peterfox!
  • fix: skip non-native methods (#7747), Thanks @​calebdw!
  • [Php74] Fix indentation space on ClosureToArrowFunctionRector with comment inner closure (#7779)
  • [DeadCode] Handle crash when parent does not has default param and child has (#7782)
  • fix mixed[] override with empty array in DocblockReturnArrayFromDirectArrayInstanceRector (#7793)
  • [ChangesReporting] Fix total changed result on JsonOutputFormatter (#7807)
  • Manage named arguments when replacing a value (#7784), Thanks @​carlos-granados!
  • [DeadCode] Register RemoveNextSameValueConditionRector in dead-code set (#7790)
  • [DeadCode] Skip final and non-public __construct() on RemoveParentDelegatingConstructorRector (#7806)
  • [DeadCode][Php80] Handle crash on mix ClassPropertyAssignToConstructorPromotionRector+RemoveParentDelegatingConstructorRector (#7799)
  • [DeadCode] Skip with elseif/else on RemoveNextSameValueConditionRector (#7809)
  • [DeadCode] Merge comment on RemoveNextSameValueConditionRector (#7810)
  • skip marker attribute in RemoveEmptyClassMethodRector (#7813)
  • [DeadCode] Skip private promoted property on RemoveParentDelegatingConstructorRector (#7817)
  • Remove rector from rule definition title (#7820), Thanks @​simonschaufi!
  • [experiment-next] Remove leaveNode() calls on AbstractImmutableNodeTraverser (#7778)
  • [DeadCode] Handle multi vars on RemoveNonExistingVarAnnotationRector (#7780)
  • [Php71] Try to handle no variants on RemoveExtraParametersRector (#7803)
Commits
  • 9afc1bb Rector 2.3.1
  • cab5db4 Updated Rector to commit 184dd0296b2bdcb7165a0879b0a830f5c77bcc44
  • cffe29b Updated Rector to commit 7891d874ac7cc0f7b3a0dc2dc128085f9038bfa9
  • 91bfe39 Updated Rector to commit 936a5e4c3b04a0c1d1ec2ffbd7536616508880de
  • f8b90ee Updated Rector to commit 679e314c916c0c61ef41ca1e40d39694c0ec10b6
  • 274878f Updated Rector to commit 9548641518f579776d75d5f0a4a1c1ea2cc615a8
  • d69a8ed Updated Rector to commit 2681751795bc580f4bab291b42cb7a6adbba03b8
  • 69f087c Updated Rector to commit ee36fdd7f17a8da512450f07aa1c41455602d952
  • 5c090b3 Updated Rector to commit f06b3589a61e31c31beef9374c4d83aaa40e6193
  • 2d1139b Updated Rector to commit e72e68284d82dcb8beb0f5bac1c1ec2f8a88494a
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [rector/rector](https://github.com/rectorphp/rector) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/rectorphp/rector/releases)
- [Commits](rectorphp/rector@2.3.0...2.3.1)

---
updated-dependencies:
- dependency-name: rector/rector
  dependency-version: 2.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file PATCH This PR is intended to be treated as a PATCH according to RFC-0002 php Pull requests that update Php code labels Jan 19, 2026
@github-actions github-actions bot added the composer Relates to composer.json label Jan 19, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

Test Results

970 tests  ±0   962 ✅ ±0   17s ⏱️ ±0s
214 suites ±0     8 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 1bebdee. ± Comparison against base commit 674f9f9.

♻️ This comment has been updated with latest results.

@Hanmac
Copy link
Contributor

Hanmac commented Jan 19, 2026

public function getPath($node)
{
if ($node instanceof Varien_Data_Tree_Node) {
} elseif (is_numeric($node)) {
if ($_node = $this->getNodeById($node)) {
return $_node->getPath();
}
}
return [];
}

imo the case for Varien_Data_Tree_Node doesn't make any sense?
Was it maybe planned to return $node->getPath() in that case?

(that's since 1.1.1)

@addison74 addison74 requested a review from Copilot January 19, 2026 13:24

This comment was marked as outdated.

@addison74 addison74 requested a review from Copilot January 22, 2026 17:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@sonarqubecloud
Copy link

@addison74
Copy link
Contributor

The Rector run highlighted an odd construct in Varien_Data_Tree::getPath() that has likely been wrong for a long time. Previously, the method contained an empty branch for Varien_Data_Tree_Node:

public function getPath($node)
{
    if ($node instanceof Varien_Data_Tree_Node) {
    } elseif (is_numeric($node)) {
        if ($_node = $this->getNodeById($node)) {
            return $_node->getPath();
        }
    }

    return null;
}

That means passing a Varien_Data_Tree_Node object to getPath() would always return null, which doesn’t really make sense given that the node itself already has a getPath() method. The current Rector change just rewrites this into a logically equivalent form, but it also makes the odd behavior more obvious.

A more reasonable implementation would be:

/**
 * Return path for node parameter
 *
 * @param Varien_Data_Tree_Node|int|string $node
 * @return string|null
 */
public function getPath($node)
{
    if ($node instanceof Varien_Data_Tree_Node) {
        return $node->getPath();
    }

    if (is_numeric($node)) {
        if ($_node = $this->getNodeById($node)) {
            return $_node->getPath();
        }
    }

    return null;
}

This keeps the existing behavior for numeric IDs and only makes the Varien_Data_Tree_Node case behave in a more logical way by delegating to $node->getPath().

However, since this changes runtime behavior (even if it is likely fixing a long‑standing bug), the issues revealed by Rector should be addressed in a separate follow‑up PR, not in this Rector bump.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 26, 2026

A newer version of rector/rector exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

composer Relates to composer.json dependencies Pull requests that update a dependency file PATCH This PR is intended to be treated as a PATCH according to RFC-0002 php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants