Closed Rohan-Jalil closed 3 years ago
Investigated this one a bit further.
In order for the env var to be passed by symfony/process, the value needs to be a string instead of an int:
grumphp:
environment:
variables:
PHP_CS_FIXER_IGNORE_ENV: "1"
This works if parallel execution is disabled.
If parallel is enabled, amp/parallel-functions
is not setting the env variables in the child process.
We'll need to find a way around this.
Fixed the behaviour in #863 and added documentation about the integer value.
1.3.0
I wanted phpcsfixer2 to pick my environment variable PHP_CS_FIXER_IGNORE_ENV which I am passing through my grumphp.yml as mentioned below to ignore the PHP version I am using. Basically, I am using PHP 8 but it is not yet supported at PHP-CS-FIXER side so they have added an environment variable which when passed, ignores the PHP version https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.17/doc/usage.rst#environment-options. But Grumphp is not picking up this environment variable and not calling phpcsfixer2 task with this environment variable.
My configuration
Run GrumpPHP
Result: