Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringToArrayArgumentProcessRector doesn't handle sprintf command string #188

Closed
Blacksmoke16 opened this issue Jun 16, 2022 · 7 comments · Fixed by #196
Closed

StringToArrayArgumentProcessRector doesn't handle sprintf command string #188

Blacksmoke16 opened this issue Jun 16, 2022 · 7 comments · Fixed by #196

Comments

@Blacksmoke16
Copy link

Bug Report

Subject Details
Rector version last dev-main
Installed as composer dependency

Minimal PHP Code Causing Issue

See https://getrector.org/demo/a1df00ad-a417-4342-8040-3d2e0562e70a

<?php

use Symfony\Component\Process\Process;

$command = sprintf("FOO=%s", 10);

$process = new Process($command);

Responsible rules

  • StringToArrayArgumentProcessRector

Expected Behavior

Probably would be easiest to skip it, as migrating the sprintf call could lead to wrong results and be quite tricky, if not impossible.

@TomasVotruba
Copy link
Member

Thank you for your report and demo link!

Could you send a failing test case in a pull-request, so we have it covered in Rector?
You can click "Create a Test" button at demo page.

@samsonasik
Copy link
Member

@TomasVotruba it seems "Create a Test" button pointed to rector-src, it not create on rector-* packages

@TomasVotruba
Copy link
Member

I see. Could you update it to point to rector-symfony if the rule is in Rector\Symfony namespace? Making it generic

@samsonasik
Copy link
Member

I will try.

@samsonasik
Copy link
Member

@samsonasik
Copy link
Member

deployed so "Create a Test" button is now working on rector-symfony

@TomasVotruba
Copy link
Member

@samsonasik Amazing work, thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants