Fabien Potencier f040844620 Merge branch '4.4' into 5.3
* 4.4:
  Bump license year
  [HttpClient] Turn negative timeout to a very long timeout
  Features goes to 6.x branch
  [Validator] throw when Constraint::_construct() has not been called
  Bump Symfony version to 4.4.37
  Update VERSION for 4.4.36
  Update CONTRIBUTORS for 4.4.36
  Update CHANGELOG for 4.4.36
  Allow symfony/runtime plugin
2022-01-02 10:51:59 +01:00
2017-01-12 08:39:44 -08:00
2021-07-29 08:18:06 +02:00
2021-12-16 22:37:57 +01:00
2022-01-02 10:41:36 +01:00
2018-11-11 20:48:54 +01:00
2021-05-26 13:20:16 +02:00

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();
$dotenv->load(__DIR__.'/.env');

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

// overwrites existing env variables
$dotenv->overload(__DIR__.'/.env');

// loads .env, .env.local, and .env.$APP_ENV.local or .env.$APP_ENV
$dotenv->loadEnv(__DIR__.'/.env');

Resources

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:32:32.195Z
Readme MIT 770 KiB
Languages
PHP 100%