8000 [Process] ARGV array in env resulting in "Array to string conversion" error · Issue #44534 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Process] ARGV array in env resulting in "Array to string conversion" error #44534
Closed
@rbaarsma

Description

@rbaarsma

Symfony version(s) affected

5.4.0

Description

See #44197

Only difference is that ARGV is coming in with capital letters and therefore not caught by the if statement on Process.php line 343

if (false !== $v && 'argc' !== $k && 'argv' !== $k) {

How to reproduce

We are following the standard approach for liuggio/fastest bundle, executing our tests with this command:

docker-compose exec php bash -c "find tests/ -name \"*Test.php\" | vendor/liuggio/fastest/fastest \"XDEBUG_MODE=coverage bin/phpunit {} --coverage-php cov/fastest/{n}.cov;\""

A simple debug of the $env at this point shows:

...
  "ARGV" => array:2 [
    0 => "vendor/liuggio/fastest/fastest"
    1 => "XDEBUG_MODE=coverage bin/phpunit {} --coverage-php cov/fastest/{n}.cov;"
  ]
  "ARGC" => 2

Possible Solution

# Process.php:343
if (false !== $v && false === \in_array(strtolower($k), ['argc', 'argv'], true)) {

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0