Skip to content

Commit acfc784

Browse files
committed
Updated Rector to commit 6a1aa20006298c6967cad644a584f9bf4e6e5ad8
rectorphp/rector-src@6a1aa20 [DeadCode] Skip next assign expr has side effect inside try {} on RemoveDoubleAssignRector (#7775)
1 parent 8dcb063 commit acfc784

File tree

8 files changed

+35
-20
lines changed

8 files changed

+35
-20
lines changed

rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use PhpParser\Node\Expr\StaticPropertyFetch;
1010
use PhpParser\Node\Expr\Variable;
1111
use PhpParser\Node\Stmt\Expression;
12+
use PhpParser\Node\Stmt\TryCatch;
1213
use Rector\DeadCode\SideEffect\SideEffectNodeDetector;
1314
use Rector\PhpParser\Enum\NodeGroup;
1415
use Rector\PhpParser\Node\BetterNodeFinder;
@@ -94,6 +95,10 @@ public function refactor(Node $node): ?Node
9495
if (!$stmt->expr->var instanceof Variable && !$stmt->expr->var instanceof PropertyFetch && !$stmt->expr->var instanceof StaticPropertyFetch) {
9596
continue;
9697
}
98+
// side effect may throw exception, and may be handled by catch block
99+
if ($node instanceof TryCatch && $this->sideEffectNodeDetector->detectCallExpr($nextAssign->expr)) {
100+
continue;
101+
}
97102
// remove current Stmt if will be overridden in next stmt
98103
unset($node->stmts[$key]);
99104
$hasChanged = \true;

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'd1ff945497efbdfca534b33443d4ac323dd3d9e3';
22+
public const PACKAGE_VERSION = '6a1aa20006298c6967cad644a584f9bf4e6e5ad8';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-12-22 22:57:45';
27+
public const RELEASE_DATE = '2025-12-24 10:19:37';
2828
/**
2929
* @var int
3030
*/

vendor/composer/installed.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,17 +1164,17 @@
11641164
},
11651165
{
11661166
"name": "react\/child-process",
1167-
"version": "v0.6.6",
1168-
"version_normalized": "0.6.6.0",
1167+
"version": "v0.6.7",
1168+
"version_normalized": "0.6.7.0",
11691169
"source": {
11701170
"type": "git",
11711171
"url": "https:\/\/github.com\/reactphp\/child-process.git",
1172-
"reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159"
1172+
"reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3"
11731173
},
11741174
"dist": {
11751175
"type": "zip",
1176-
"url": "https:\/\/api.github.com\/repos\/reactphp\/child-process\/zipball\/1721e2b93d89b745664353b9cfc8f155ba8a6159",
1177-
"reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159",
1176+
"url": "https:\/\/api.github.com\/repos\/reactphp\/child-process\/zipball\/970f0e71945556422ee4570ccbabaedc3cf04ad3",
1177+
"reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3",
11781178
"shasum": ""
11791179
},
11801180
"require": {
@@ -1188,7 +1188,7 @@
11881188
"react\/socket": "^1.16",
11891189
"sebastian\/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0"
11901190
},
1191-
"time": "2025-01-01T16:37:48+00:00",
1191+
"time": "2025-12-23T15:25:20+00:00",
11921192
"type": "library",
11931193
"installation-source": "dist",
11941194
"autoload": {
@@ -1230,7 +1230,7 @@
12301230
],
12311231
"support": {
12321232
"issues": "https:\/\/github.com\/reactphp\/child-process\/issues",
1233-
"source": "https:\/\/github.com\/reactphp\/child-process\/tree\/v0.6.6"
1233+
"source": "https:\/\/github.com\/reactphp\/child-process\/tree\/v0.6.7"
12341234
},
12351235
"funding": [
12361236
{
@@ -1877,12 +1877,12 @@
18771877
"source": {
18781878
"type": "git",
18791879
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
1880-
"reference": "8f390b11611c71255d25d03b514955aeede1be94"
1880+
"reference": "7aeb980491abb8ddc156e20dde808bcc85c0eb35"
18811881
},
18821882
"dist": {
18831883
"type": "zip",
1884-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/8f390b11611c71255d25d03b514955aeede1be94",
1885-
"reference": "8f390b11611c71255d25d03b514955aeede1be94",
1884+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/7aeb980491abb8ddc156e20dde808bcc85c0eb35",
1885+
"reference": "7aeb980491abb8ddc156e20dde808bcc85c0eb35",
18861886
"shasum": ""
18871887
},
18881888
"require": {
@@ -1895,7 +1895,7 @@
18951895
"phpstan\/phpstan": "^2.1.32",
18961896
"phpstan\/phpstan-webmozart-assert": "^2.0",
18971897
"phpunit\/phpunit": "^11.5",
1898-
"rector\/jack": "^0.2.9",
1898+
"rector\/jack": "^0.4",
18991899
"rector\/rector-src": "dev-main",
19001900
"rector\/type-perfect": "^2.1",
19011901
"symfony\/config": "^6.4",
@@ -1910,11 +1910,11 @@
19101910
"symplify\/phpstan-rules": "^14.9",
19111911
"symplify\/vendor-patches": "^11.5",
19121912
"tomasvotruba\/class-leak": "^2.1",
1913-
"tomasvotruba\/type-coverage": "^2.0",
1913+
"tomasvotruba\/type-coverage": "^2.1",
19141914
"tomasvotruba\/unused-public": "^2.1",
19151915
"tracy\/tracy": "^2.11"
19161916
},
1917-
"time": "2025-12-22T15:36:29+00:00",
1917+
"time": "2025-12-22T15:59:46+00:00",
19181918
"default-branch": true,
19191919
"type": "rector-extension",
19201920
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vendor/react/child-process/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 0.6.7 (2025-12-23)
4+
5+
Just in time for the holidays, we are happy to announce the release of `v0.6.7`! 🎄🎉
6+
7+
This is a compatibility release that contains backported features from the `0.7.x` branch.
8+
Once v0.7 is released, it will be the way forward for this project.
9+
10+
* Feature: Improve PHP 8.5+ support by replacing binary cast with string cast.
11+
(#119 by @kubawerlos and @WyriHaximus)
12+
313
## 0.6.6 (2025-01-01)
414

515
This is a compatibility release that contains backported features from the `0.7.x` branch.

vendor/react/child-process/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ The recommended way to install this library is [through Composer](https://getcom
588588
This will install the latest supported version:
589589

590590
```bash
591-
composer require react/child-process:^0.6.6
591+
composer require react/child-process:^0.6.7
592592
```
593593

594594
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

vendor/rector/extension-installer/src/GeneratedConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
final class GeneratedConfig
1111
{
12-
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 7740494'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 7640420'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 4fa695b'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 8f390b1'));
12+
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 7740494'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 7640420'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 4fa695b'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 7aeb980'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-symfony/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"phpstan\/phpstan": "^2.1.32",
1414
"phpstan\/phpstan-webmozart-assert": "^2.0",
1515
"phpunit\/phpunit": "^11.5",
16-
"rector\/jack": "^0.2.9",
16+
"rector\/jack": "^0.4",
1717
"rector\/rector-src": "dev-main",
1818
"rector\/type-perfect": "^2.1",
1919
"symfony\/config": "^6.4",
@@ -28,7 +28,7 @@
2828
"symplify\/phpstan-rules": "^14.9",
2929
"symplify\/vendor-patches": "^11.5",
3030
"tomasvotruba\/class-leak": "^2.1",
31-
"tomasvotruba\/type-coverage": "^2.0",
31+
"tomasvotruba\/type-coverage": "^2.1",
3232
"tomasvotruba\/unused-public": "^2.1",
3333
"tracy\/tracy": "^2.11"
3434
},

0 commit comments

Comments
 (0)