Skip to content

Symfony: .env.local and .env.test are ignored #99

Closed
@ThomasLandauer

Description

@ThomasLandauer

Starting in November 2018, Symfony has changed the way .env files are working: https://symfony.com/doc/current/configuration.html#the-env-file-environment-variables

These changes are not realized in Codeception.

To assert this, I created a controller which just outputs an environment variable:

return new Response(getenv('MAILER_URL'));`

When I access the url with codeception (codecept_debug($I->grabPageSource());), I always get what I have in .env (should be .env.local or .env.test).

However, when I open the page in the browser in DEV environment, I get the content of .env.dev, when in TEST environment, .env.test; this is the expected behavior.

Details

  • Codeception version: 2.5.x-dev fc6deb8
  • Symfony version: 4.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions