Skip to content

Commit 3ac3449

Browse files
committed
Updated Rector to commit bdf9c43c99d6ecda4396145b8217aa2f21bac817
rectorphp/rector-src@bdf9c43 [fix] restore missing pInterpolatedStringPart(), cover with test (#7741)
1 parent 894fcd5 commit 3ac3449

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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 = '2.2.12';
22+
public const PACKAGE_VERSION = 'bdf9c43c99d6ecda4396145b8217aa2f21bac817';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-12-09 00:32:57';
27+
public const RELEASE_DATE = '2025-12-09 07:41:03';
2828
/**
2929
* @var int
3030
*/

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use PhpParser\Node\Expr\MethodCall;
2121
use PhpParser\Node\Expr\Ternary;
2222
use PhpParser\Node\Expr\Yield_;
23+
use PhpParser\Node\InterpolatedStringPart;
2324
use PhpParser\Node\Scalar\InterpolatedString;
2425
use PhpParser\Node\Scalar\String_;
2526
use PhpParser\Node\Stmt\Declare_;
@@ -106,6 +107,14 @@ public function pFileWithoutNamespace(FileWithoutNamespace $fileWithoutNamespace
106107
{
107108
return $this->pStmts($fileWithoutNamespace->stmts);
108109
}
110+
/**
111+
* Use for standalone InterpolatedStringPart printing, that is not support by php-parser natively.
112+
* Used e.g. in \Rector\PhpParser\Comparing\NodeComparator::printWithoutComments
113+
*/
114+
protected function pInterpolatedStringPart(InterpolatedStringPart $interpolatedStringPart): string
115+
{
116+
return $interpolatedStringPart->value;
117+
}
109118
protected function p(Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, bool $parentFormatPreserved = \false): string
110119
{
111120
// handle already AlwaysRememberedExpr

0 commit comments

Comments
 (0)