Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

* 6.4:
  [6.3] Remove unused test fixture
  [5.4] Remove unused test fixtures
  [Dotent] Add PHPDoc for `$overrideExistingVars`
  [SecurityBundle] Fix missing login-link element in xsd schema
  [Validator] Add missing Chinese translations #51934
  replace a not-existing virtual request stack with the real one
  [Messenger] add handler description as array key to `HandlerFailedException::getWrappedExceptions()`
  [Serializer] Fix using `DateIntervalNormalizer` with union types
  [Validator] fix: add missing translations for for Thai (th)
  fix #52273 [doctrine-messenger] DB table locks on messenger_messages with many failures
  [Serializer] Handle defaultContext for DateTimeNormalizer
  declare constructor argument as optional for backwards compatibility
  [CI] Add step to verify symfony/deprecation-contracts requirements

Git stats


Failed to load latest commit information.
Latest commit message
Commit time
October 19, 2023 17:45
February 14, 2023 09:44
January 12, 2017 08:39
July 20, 2022 11:46
October 26, 2023 11:15
January 24, 2023 15:02
May 26, 2021 13:20

Dotenv Component

Symfony Dotenv parses .env files to make environment variables stored in them accessible via $_SERVER or $_ENV.

Getting Started

$ composer require symfony/dotenv
use Symfony\Component\Dotenv\Dotenv;

$dotenv = new Dotenv();

// you can also load several files
$dotenv->load(__DIR__.'/.env', __DIR__.'/');

// overwrites existing env variables

// loads .env, .env.local, and .env.$APP_ENV.local or .env.$APP_ENV