rectorphp / rector-symfony

Rector upgrade rules for Symfony
http://getrector.com
MIT License
178 stars 86 forks source link

StringToArrayArgumentProcessRector with $process->setInput() #646

Closed refsz closed 6 days ago

refsz commented 1 month ago

I have the following Code in my project:

$process = new Process($command); if (\in_array('pandoc', $command, true)) { $process->setInput('<p></p>'); }

The rule StringToArrayArgumentProcessRector changes the code for setInput to $process->setInput(['<p></p>']);

Then PHPStan complains because setInput does not support arrays.

Should setInput be included in EXCLUDED_PROCESS_METHOD_CALLS?

samsonasik commented 1 month ago

Could you provide a patch? the steps:

thank you.