nacmartin / phpexecjs

Run JavaScript code from PHP
MIT License
146 stars 26 forks source link

Symfony/Process: Fix constructor deprecation warning for v4.2+ #10

Closed roydejong closed 5 years ago

roydejong commented 5 years ago

This PR fixes the following warning, which is raised when Symfony\Process v4.2+ is used:

Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell.

This PR changes executeCommand behavior to detect and use fromShellCommandline() if available.