Skip to content

[Process] Document that environment variables are inherited to child processes #10967

Closed
@mhujer

Description

@mhujer

As discussed in symfony/symfony#29722, environment variables are inherited to a child process unless specified otherwise.

It may lead to confusion when trying to run command in other environment with --env=test (even in different app). I suggest that something like this is added to https://symfony.com/doc/current/components/process.html (or maybe a whole section with a more detailed explanation):

Caution: Environment variables are always inherited to child process unless you pass ['APP_ENV' => false, 'SYMFONY_DOTENV_VARS' => false] when creating new instance of Symfony\Component\Process\Process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProcesshasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions