Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy