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

Skip to content

[PHPUnit] SYMFONY_DEPRECATIONS_HELPER var is in the wrong place (.env.test) #30047

Closed
@proArtex

Description

@proArtex

Symfony version(s) affected:

  • symfony/test-pack: 1.0.5
  • symfony/phpunit-bridge: 4.2.2

Description
Phpunit recipe contains SYMFONY_DEPRECATIONS_HELPER env var inside .env.test file. But it doesn't work here.

How to reproduce

  • write a WebTestCase that triggers deprecation warning
  • set SYMFONY_DEPRECATIONS_HELPER=weak inside .env.test (or .env.test.local)
  • run rm -rf var/cache
  • run bin/phpunit
    Then you will see the "Remaining deprecation notices ..." message and exit code 1

Possible Solution
Put SYMFONY_DEPRECATIONS_HELPER variable inside phpunit.xml.dist file
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />

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