Conversation
Rector\Tests\DowngradePhp85\Rector\StmtsAwareInterface\DowngradePipeOperatorRector\DowngradePipeOperatorRectorTest::test with data set #0 ('/home/runner/work/rector-down...hp.inc')
PHPStan\Parser\ParserErrorsException: Syntax error, unexpected '>', Syntax error, unexpected '>', Syntax error, unexpected '>'How to fix it? |
|
That somehow cause php < 8.5 error, probably issue on phpstan internal parser. |
|
You can add PHP 8.5 to workflow, then add: on test method. |
|
Add php 8.5 as well here |
|
@arshidkv12 could you create separate PR for workflow CI update? That's to allow enabled by @TomasVotruba then another PR can keep working without waiting for: before waiting this PR merged. |
|
@samsonasik Ok |
|
The rule need to be registered at https://github.com/rectorphp/rector-downgrade-php/blob/main/config/set/downgrade-php85.php |
|
Also, please run: |
| } | ||
|
|
||
| if ($node instanceof MethodCall) { | ||
| $clonedMethodCall = clone $node; |
There was a problem hiding this comment.
why clone is needed? should direct replace args works?
| return null; | ||
| } | ||
|
|
||
| $tempVarName = 'result' . (++$tempVariableCounter); |
There was a problem hiding this comment.
this increment can use NamedVariableFactory::createVariable() to allow first not replace existing $result variable.
rector-downgrade-php/src/NodeFactory/NamedVariableFactory.php
Lines 19 to 24 in 2c4aa18
that will do the increment
| } | ||
|
|
||
| if ($node instanceof StaticCall) { | ||
| $clonedStaticCall = clone $node; |
There was a problem hiding this comment.
why clone is needed? should direct replace args works?
|
I will look into this to mirror with upgrade rule PR: |
No description provided.