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

Bad process creation for Symfony > 4.2 #973

Open
NicolasGuilloux opened this issue Oct 22, 2019 · 2 comments
Open

Bad process creation for Symfony > 4.2 #973

NicolasGuilloux opened this issue Oct 22, 2019 · 2 comments
Labels

Comments

@NicolasGuilloux
Copy link

NicolasGuilloux commented Oct 22, 2019

Hi there !

There is a deprecated for Symfony version above 4.2 where the Process requires an array when built. I noticed this thing for the Async Command bundle but may be present elsewhere. A quick fix is to check the version of Symfony, and choose the appropriate function like bellow:

if (Kernel::MAJOR_VERSION >= 4 && Kernel::MINOR_VERSION >= 2) {
    $process = Process::fromShellCommandline($phpBin.' '.$consoleBin.' '.$this->getCommandLine($command), $this->projectDir);
} else {
    $process = new Process($phpBin.' '.$consoleBin.' '.$this->getCommandLine($command), $this->projectDir);
}
@Steveb-p
Copy link
Contributor

It's a deprecation. Process constructor will fall back to fromShellCommandline until Symfony 5.0.

Prefered solution would be to use an array argument.

@stale
Copy link

stale bot commented Nov 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 21, 2019
@stale stale bot removed the wontfix label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants