Description
Symfony version(s) affected
v6.4.2
How to reproduce
In my Laravel project composer.json file, script defined a few script like that
"post-update-cmd": [
"@php -r \"file_put_contents('storage/local/last-composer-lock-hash', md5_file('composer.lock'));\""
],
when I run composer run script post-update-cmd
the composer package will remove the prefix @php
and extract -r
to determine if the file is executable, and then the exec('command -v')
will execute -r
that exec('command -v -r')
and output a message that "sh: line 0: command: -r: invalid option
command: usage: command [-pVv] command [arg ...]
"
Possible Solution
I want to pull a PR to update the exec()
function, What do you think about that?
Additional Context
No response