Thanks to visit codestin.com
Credit goes to github.com

Skip to content

symfony/phpunit-bridge overwrite some phpunit.xml parameters at runtime #476

@MichaelDemeyer

Description

@MichaelDemeyer

bin/phpunit file check following env parameters at runtime :

  • SYMFONY_DEPRECATIONS_HELPER
  • SYMFONY_PHPUNIT_REMOVE
  • SYMFONY_PHPUNIT_VERSION
  • SYMFONY_PHPUNIT_DIR
    and set a default value if they're not already defined.
    Values defined in phpunit.xml are not defined as env values at this point, so default values will apply.

vendor/symfony/phpunit-bridge/bin/simple-phpunit file do not apply phpunit.xml values if env variables are already set.

So basically it is impossible to set the 4 env variables using phpunit.xml

Step to reproduce :
Add
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled" force="true"/>
to phpunit.xml
run bin/phpunit
SYMFONY_DEPRECATIONS_HELPER value will be 999999

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions