Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.

Related tags

phpdotenv
Overview

PHP dotenv

Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically.

Banner

Software License Total Downloads Latest Version

Why .env?

You should never store sensitive credentials in your code. Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments – such as database credentials or credentials for 3rd party services – should be extracted from the code into environment variables.

Basically, a .env file is an easy way to load custom configuration variables that your application needs without having to modify .htaccess files or Apache/nginx virtual hosts. This means you won't have to edit any files outside the project, and all the environment variables are always set no matter how you run your project - Apache, Nginx, CLI, and even PHP's built-in webserver. It's WAY easier than all the other ways you know of to set environment variables, and you're going to love it!

  • NO editing virtual hosts in Apache or Nginx
  • NO adding php_value flags to .htaccess files
  • EASY portability and sharing of required ENV values
  • COMPATIBLE with PHP's built-in web server and CLI runner

PHP dotenv is a PHP version of the original Ruby dotenv.

Installation

Installation is super-easy via Composer:

$ composer require vlucas/phpdotenv

or add it by hand to your composer.json file.

Upgrading

We follow semantic versioning, which means breaking changes may occur between major releases. We have upgrading guides available for V2 to V3, V3 to V4 and V4 to V5 available here.

Usage

The .env file is generally kept out of version control since it can contain sensitive API keys and passwords. A separate .env.example file is created with all the required environment variables defined except for the sensitive ones, which are either user-supplied for their own development environments or are communicated elsewhere to project collaborators. The project collaborators then independently copy the .env.example file to a local .env and ensure all the settings are correct for their local environment, filling in the secret keys or providing their own values when necessary. In this usage, the .env file should be added to the project's .gitignore file so that it will never be committed by collaborators. This usage ensures that no sensitive passwords or API keys will ever be in the version control history so there is less risk of a security breach, and production values will never have to be shared with all project collaborators.

Add your application configuration to a .env file in the root of your project. Make sure the .env file is added to your .gitignore so it is not checked-in the code

S3_BUCKET="dotenv"
SECRET_KEY="souper_seekret_key"

Now create a file named .env.example and check this into the project. This should have the ENV variables you need to have set, but the values should either be blank or filled with dummy data. The idea is to let people know what variables are required, but not give them the sensitive production values.

S3_BUCKET="devbucket"
SECRET_KEY="abc123"

You can then load .env in your application with:

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();

To suppress the exception that is thrown when there is no .env file, you can:

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->safeLoad();

Optionally you can pass in a filename as the second parameter, if you would like to use something other than .env:

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__, 'myconfig');
$dotenv->load();

All of the defined variables are now available in the $_ENV and $_SERVER super-globals.

$s3_bucket = $_ENV['S3_BUCKET'];
$s3_bucket = $_SERVER['S3_BUCKET'];

Putenv and Getenv

Using getenv() and putenv() is strongly discouraged due to the fact that these functions are not thread safe, however it is still possible to instruct PHP dotenv to use these functions. Instead of calling Dotenv::createImmutable, one can call Dotenv::createUnsafeImmutable, which will add the PutenvAdapter behind the scenes. Your environment variables will now be available using the getenv method, as well as the super-globals:

$s3_bucket = getenv('S3_BUCKET');
$s3_bucket = $_ENV['S3_BUCKET'];
$s3_bucket = $_SERVER['S3_BUCKET'];

Nesting Variables

It's possible to nest an environment variable within another, useful to cut down on repetition.

This is done by wrapping an existing environment variable in ${…} e.g.

BASE_DIR="/var/webroot/project-root"
CACHE_DIR="${BASE_DIR}/cache"
TMP_DIR="${BASE_DIR}/tmp"

Immutability and Repository Customization

Immutability refers to if Dotenv is allowed to overwrite existing environment variables. If you want Dotenv to overwrite existing environment variables, use createMutable instead of createImmutable:

$dotenv = Dotenv\Dotenv::createMutable(__DIR__);
$dotenv->load();

Behind the scenes, this is instructing the "repository" to allow immutability or not. By default, the repository is configured to allow overwriting existing values by default, which is relevant if one is calling the "create" method using the RepositoryBuilder to construct a more custom repository:

$repository = Dotenv\Repository\RepositoryBuilder::createWithNoAdapters()
    ->addAdapter(Dotenv\Repository\Adapter\EnvConstAdapter::class)
    ->addWriter(Dotenv\Repository\Adapter\PutenvAdapter::class)
    ->immutable()
    ->make();

$dotenv = Dotenv\Dotenv::create($repository, __DIR__);
$dotenv->load();

The above example will write loaded values to $_ENV and putenv, but when interpolating environment variables, we'll only read from $_ENV. Moreover, it will never replace any variables already set before loading the file.

By means of another example, one can also specify a set of variables to be allow listed. That is, only the variables in the allow list will be loaded:

$repository = Dotenv\Repository\RepositoryBuilder::createWithDefaultAdapters()
    ->allowList(['FOO', 'BAR'])
    ->make();

$dotenv = Dotenv\Dotenv::create($repository, __DIR__);
$dotenv->load();

Requiring Variables to be Set

PHP dotenv has built in validation functionality, including for enforcing the presence of an environment variable. This is particularly useful to let people know any explicit required variables that your app will not work without.

You can use a single string:

$dotenv->required('DATABASE_DSN');

Or an array of strings:

$dotenv->required(['DB_HOST', 'DB_NAME', 'DB_USER', 'DB_PASS']);

If any ENV vars are missing, Dotenv will throw a RuntimeException like this:

One or more environment variables failed assertions: DATABASE_DSN is missing

Empty Variables

Beyond simply requiring a variable to be set, you might also need to ensure the variable is not empty:

$dotenv->required('DATABASE_DSN')->notEmpty();

If the environment variable is empty, you'd get an Exception:

One or more environment variables failed assertions: DATABASE_DSN is empty

Integer Variables

You might also need to ensure that the variable is of an integer value. You may do the following:

$dotenv->required('FOO')->isInteger();

If the environment variable is not an integer, you'd get an Exception:

One or more environment variables failed assertions: FOO is not an integer.

One may only want to enforce validation rules when a variable is set. We support this too:

$dotenv->ifPresent('FOO')->isInteger();

Boolean Variables

You may need to ensure a variable is in the form of a boolean, accepting "true", "false", "On", "1", "Yes", "Off", "0" and "No". You may do the following:

$dotenv->required('FOO')->isBoolean();

If the environment variable is not a boolean, you'd get an Exception:

One or more environment variables failed assertions: FOO is not a boolean.

Similarly, one may write:

$dotenv->ifPresent('FOO')->isBoolean();

Allowed Values

It is also possible to define a set of values that your environment variable should be. This is especially useful in situations where only a handful of options or drivers are actually supported by your code:

$dotenv->required('SESSION_STORE')->allowedValues(['Filesystem', 'Memcached']);

If the environment variable wasn't in this list of allowed values, you'd get a similar Exception:

One or more environment variables failed assertions: SESSION_STORE is not an allowed value.

It is also possible to define a regex that your environment variable should be.

$dotenv->required('FOO')->allowedRegexValues('([[:lower:]]{3})');

Comments

You can comment your .env file using the # character. E.g.

# this is a comment
VAR="value" # comment
VAR=value # comment

Parsing Without Loading

Sometimes you just wanna parse the file and resolve the nested environment variables, by giving us a string, and have an array returned back to you. While this is already possible, it is a little fiddly, so we have provided a direct way to do this:

// ['FOO' => 'Bar', 'BAZ' => 'Hello Bar']
Dotenv\Dotenv::parse("FOO=Bar\nBAZ=\"Hello \${FOO}\"");

This is exactly the same as:

Dotenv\Dotenv::createArrayBacked(__DIR__)->load();

only, instead of providing the directory to find the file, you have directly provided the file contents.

Usage Notes

When a new developer clones your codebase, they will have an additional one-time step to manually copy the .env.example file to .env and fill-in their own values (or get any sensitive values from a project co-worker).

Security

If you discover a security vulnerability within this package, please send an email to Graham Campbell at [email protected]. All security vulnerabilities will be promptly addressed. You may view our full security policy here.

License

PHP dotenv is licensed under The BSD 3-Clause License.

For Enterprise

Available as part of the Tidelift Subscription

The maintainers of vlucas/phpdotenv and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Issues
  • When you have two or more sites on one server, the sites's .env will affect each other

    When you have two or more sites on one server, the sites's .env will affect each other

    php manual: function putenv()

    The environment variable will only exist for the duration of the current request.

        public function setEnvironmentVariable($name, $value = null)
        {
            list($name, $value) = $this->normaliseEnvironmentVariable($name, $value);
    
            // Don't overwrite existing environment variables if we're immutable
            // Ruby's dotenv does this with `ENV[key] ||= value`.
            if ($this->immutable && $this->getEnvironmentVariable($name) !== null) {
                return;
            }
    
            // If PHP is running as an Apache module and an existing
            // Apache environment variable exists, overwrite it
            if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name)) {
                apache_setenv($name, $value);
            }
    
            if (function_exists('putenv')) {
                putenv("$name=$value");
            }
    
            $_ENV[$name] = $value;
            $_SERVER[$name] = $value;
        }
    
        public function getEnvironmentVariable($name)
        {
            switch (true) {
                case array_key_exists($name, $_ENV):
                    return $_ENV[$name];
                case array_key_exists($name, $_SERVER):
                    return $_SERVER[$name];
                default:
                    $value = getenv($name);//****notice line****
                    return $value === false ? null : $value; 
            }
        }
    

    When one request was running, the other request would get this one's env(getenv);

    we can use overload() instead of load() to circumvent this problem;

    This is just a suggestion;

    opened by leesenlen 59
  • Do not throw and exception if .env file is missing

    Do not throw and exception if .env file is missing

    I think it would be a good idea to change the Dotenv::load method so that it wouldn't throw an exception. The motivation for this is that not all environments use a .env file, for example when we deploy to Amazon we configure the environmental variables through OpsWorks. What this means in practice is that I need an additional check in application to see if the file actually exists before calling Dotenv::load. What do you think?

    opened by crisu83 37
  • dotenv v2

    dotenv v2

    As mentioned in #43 I've tried a few different things:

    1. PSR-4 and PSR-2
    2. namespaced to Dotenv with main public API in Dotenv\Dotenv
    3. Broken functionality into smaller distinct classes with single responsibility
    4. Changed immutability, making it a little less clunky, so now we have load = immutable and overload = mutable. I know you didn't want to copy the ruby dotenv @vlucas but I felt this was pretty elegant.
    5. Parsing of variables now done with a series of filters. To extend parsing as in #40 the Dotenv\Dotenv class can be extended and a new filter added to the parser. Or indeed a different parser.
    6. I also added a help dotenv() function in order to simplify instantiation, e.g. dotenv()->load(…) as an experiement.
    7. haven't yet implemented a static factory as requested by @bcremer in #43

    Comments please.

    opened by kelvinj 35
  • Detect and convert types

    Detect and convert types

    In my .env file I have values like:

    APP_DEBUG=true
    APP_DEV=false
    

    But the type of these values is always string:

    var_dump(getenv('APP_DEBUG')); // string(4) "true"
    var_dump(getenv('APP_DEV')); // string(5) "false"
    

    I think the values like true, false, null (or even numbers), without quotes, should be converted to the correct type (boolean, integers, etc), because in cases like this, APP_DEV returns "false" so it's evaluated as true:

    if (getenv('APP_DEV')) {
        // do something
    }
    
    opened by oscarotero 33
  • Multifile merge handling. Dotenv::read method.

    Multifile merge handling. Dotenv::read method.

    Added ability to handle multiple files in the situations where there's need for more than one file to be loaded and variables to be merged / overwritten in the order of the loaded paths.

    Also added Dotenv::read() method, which reads variables without setting them up - useful in the situations where you have to overwrite certain configuration at runtime without changing the environment.

    One use case for these changes is the multi tenancy application where .env files for each tenant are stored in separate directory and only contain variables that should overwrite the ones set up in the main .env file.

    opened by sebastiansulinski 30
  • .env containing duplicates provides confusing outcome

    .env containing duplicates provides confusing outcome

    Hello! Thanks for your library - it's very helpful.

    I recently came across a confusing situation, where I had inadvertently set the same variable twice in a .env file with different values (as part of a Laravel deployment).

    Example:

    APP_DEBUG=false
    ....
    APP_DEBUG=true
    

    Results in APP_DEBUG=false after loading.

    I totally realize that it's my responsibility to ensure that I'm not setting these twice, however I was surprised that there wasn't something that would either warn me about a duplicate, or use the last-set value, since it was set later?

    Is this something that should be handled in the library? I couldn't find an associated test that expresses this concept.

    opened by miketheman 28
  • Variables with \n converted to empty strings (after last updating)

    Variables with \n converted to empty strings (after last updating)

    Hi to all!

    Before the last updating the next variable was working correctly: VARIABLE="Text with\nsome end of lines\n" and in the php when i wrote the next code: echo env('VARIABLE'); returns: Text with\nsome end of lines\n

    After the last update the variable returns: `` <- empty string

    opened by ilnurshax 26
  • What's Blocking The 2.0 Release Please?

    What's Blocking The 2.0 Release Please?

    We were hopping to get phpdotenv 2.x into Laravel 5.1. Is there anything we can do to help out?

    opened by GrahamCampbell 26
  • add composer/installers to allow the option to customize where the li…

    add composer/installers to allow the option to customize where the li…

    …brary is loaded

    I have a WordPress application where I am going to need to specifically install this library in a separate directory and include it earlier than it would if it were in my default vendor directory. I'm already using the vendor directory in a separate location (mu-plugins with the composer autoloader) which runs much later than I need the dotenv code to run.

    This shouldn't impact anything in your app.

    opened by matgargano 25
  • v2 Release Prep

    v2 Release Prep

    First off -

    Thanks everyone (especially @kelvinj) for all the hard work on v2 so far. I just updated the README file for it, as well as made some naming changes to the assertion methods to make them read better. Check the code and/or the README file to see what I mean.

    My concerns before the release: Now that we have alternate PHP and JSON loaders, I would like to change the variable nesting to match the bash-style syntax instead of the current PHP-style syntax. I would also like to remove support for spaced values that are not quoted.

    The primary motivation for these changes is that I think if you use the bash-style syntax, there shouldn't be any features of phpdotenv that will break bash evaluation of the .env file.

    For instance, pull down the latest v2 branch and run:

    source tests/fixtures/env/nested.env && echo $NVAR4
    

    Then run:

    source tests/fixtures/env/nested.env && echo $NVAR3
    

    And:

    source tests/fixtures/env/commented.env
    

    I also had to switch the example to double quotes instead of single quotes for the bash variable interpolation to work - the same thing that happens in PHP too. Perhaps we should also require double quotes? Is that going too far?

    opened by vlucas 21
  • Container installation

    Container installation

    I have been following a MongoDB guide for deploying PHP with MongoDB client / SDK here. In this guide, they use your composer package.

    However, I would like to place this into a Docker container, and was able to get the mongodb/mongodb package installed by replacing the __DIR__ location and hardcoding in a full path to "/usr/bin/vendor/autoload.php" in a PHP page's require_once directive. I simply appended the installation of PHPDotEnv to this same composer command: RUN cd /usr/bin && composer require mongodb/mongodb vlucas/phpdotenv

    I rebuilt the Dockerfile and uploaded to Docker Hub, which was successful, as redswitch/php-mongodb

    Now on 1st run, I cannot load the package. I have tried both these commands but errors same each time: $dotenv = Dotenv\Dotenv::createImmutable("/usr/bin"); $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);

    To load the mongodb package, I use: require_once '/usr/bin/vendor/autoload.php';

    (As opposed to __DIR__ . '/vendor/autoload.php';)

    My docker-compose.yml moves the /var/www/html/ directory to the same directory, i.e.:

    services:
      web:
        image: redswitch/php-mongodb:8.0-1.9.0
        container_name: web
        volumes:
          - ./html:/var/www/html
    

    I cannot find any files or folders inside the container matching "Dotenv".

    Can I ask for further troubleshooting / assistance please?

    opened by dan-burt 0
  • References to variables which are not set are left expanded

    References to variables which are not set are left expanded

    Summary

    If .env references a variable (e.g. ${FOO}) which is not already set (either via the external environment, or in the .env file, it is left unexpanded.

    This is in contrast to the following other languages / implementations which will expand the variable to an empty string:

    Demo

    Consider this .env file:

    # A simple, constant env var
    CONST='A constant env var'
    
    # Derived from another variable
    DERIV="I came from ${CONST} with some more"
    
    # An environment variable we expect to be set on the outside
    EXT_SET=${ENV_EXT_SET}
    
    # An environment variable we expect *not* to be set on the outside
    EXT_UNSET=${ENV_EXT_UNSET}
    

    When loaded by bash, EXT_UNSET will get the value "" (that is, the empty string).

    When loaded by phpdotenv v5.2.0, EXT_UNSET will get the value "${ENV_EXT_UNSET}" (literally).

    See this gist for a full reproducible example:

    $ pip3 install scuba
    $ ./prepare.sh
    $ ./run_test.sh
    ------------------------------------------------------
    Bash:
    CONST=A constant env var
    DERIV=I came from A constant env var with some more
    EXT_SET=set externally
    EXT_UNSET=
    
    ------------------------------------------------------
    phpdotenv:
    $_ENV = Array
    (
        [CONST] => A constant env var
        [DERIV] => I came from A constant env var with some more
        [EXT_SET] => set externally
        [EXT_UNSET] => ${ENV_EXT_UNSET}
    )
    
    ------------------------------------------------------
    python-dotenv:
    CONST=A constant env var
    DERIV=I came from A constant env var with some more
    EXT_SET=set externally
    EXT_UNSET=
    

    References

    • Upstream issue: https://github.com/snipe/snipe-it/issues/6578
    opened by JonathonReinhart 6
  • One .env to rule them all

    One .env to rule them all

    Managing several '.env' files plus a '.env.example' is sometimes complicated, and frequently we get some of those files out of sync.

    So, it could be a nice feature to be able to use a single .env file for all environments, by just hinting environments like:

    DB_CONNECTION=pgsql // default, not found, or simply the same on all environments
    
    DB_HOST.local=127.0.0.1
    DB_HOST.testing=postgres
    DB_HOST.staging=10.0.0.2
    DB_HOST.production=172.17.0.101
    

    And, of course, way of loading for loading the current environment:

    $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
    $dotenv->load('production');
    
    opened by antonioribeiro 11
Releases(v5.3.0)
  • v5.3.0(Jan 20, 2021)

    We announce the immediate availability V5.3.0.

    New Features

    • Made Validator::assert and Validator::assertNullable public (b3eac5c7ac896e52deab4a99068e3f4ab12d9e56)

    Bug Fixes

    • Reject env files with missmatched quotes (ef736adce235936a030be921e8c25b12a8ee2eb6)
    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Jan 20, 2021)

    We announce the immediate availability V4.2.0.

    New Features

    • Backported Dotenv::createArrayBacked() and Dotenv::parse() (b56a06737822956e1d408304315946f50fa39bc5)

    Bug Fixes

    • Reject env files with missmatched quotes (e9a36be8898e927403d42409e1401020fab0e6a2)
    Source code(tar.gz)
    Source code(zip)
  • v3.6.8(Jan 20, 2021)

    We announce the immediate availability V3.6.8.

    Bug Fixes

    • Reject env files with missmatched quotes (04e416a863cb1b43caf489adb01a6591d4b11a18)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.7(Jan 20, 2021)

    We announce the immediate availability V2.6.7.

    Bug Fixes

    • Reject env files with missmatched quotes (7417448b378af024801ea96027e805b1db12401d)
    Source code(tar.gz)
    Source code(zip)
  • v5.2.0(Sep 14, 2020)

  • v5.1.0(Jul 14, 2020)

    We announce the immediate availability V5.1.0.

    New Features

    • Added Dotenv::createArrayBacked() and Dotenv::parse() (ad9eb3f8a08906ce477d8ec4638915c98e562044)
    Source code(tar.gz)
    Source code(zip)
  • v5.0.1(Jul 14, 2020)

  • v4.1.8(Jul 14, 2020)

    We announce the immediate availability V4.1.8.

    Bug Fixes

    • Bumped minimum ctype polyfill (e1d57f62db3db00d9139078cbedf262280701479)
    • Fixed preg error lookup for all PHP versions (d4c24c31b5a5a83b77515b499a04f5c1a72a8791)
    • Added additional type information and fixed edge cases
    Source code(tar.gz)
    Source code(zip)
  • v3.6.7(Jul 14, 2020)

    We announce the immediate availability V3.6.7.

    Bug Fixes

    • Bumped minimum ctype polyfill (e1d57f62db3db00d9139078cbedf262280701479)
    • Fixed preg error lookup for all PHP versions (d4c24c31b5a5a83b77515b499a04f5c1a72a8791)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.6(Jul 14, 2020)

  • v5.0.0(Jun 7, 2020)

    We announce the immediate availability V5.0.0.

    We've made some further improvements to this library, since v4, maintaining the same API where possible.

    New Features

    • Support for multibyte values
    • More flexible repositories
    • Disable get/putenv by default
    • Replaced whitelists by allow lists
    • Strict parameter typing

    Upgrading Notes

    Please see the upgrading guide.

    Source code(tar.gz)
    Source code(zip)
  • v4.1.7(Jun 7, 2020)

  • v3.6.6(Jun 7, 2020)

  • v2.6.5(Jun 7, 2020)

  • v4.1.6(May 23, 2020)

    We announce the immediate availability V4.1.6.

    Bug Fixes

    • Graceful preg error handling when parsing names (8f71e9a538bddac9e9646dcabb4a8076d53b9e09)
    Source code(tar.gz)
    Source code(zip)
  • v3.6.5(May 23, 2020)

    We announce the immediate availability V3.6.5.

    Bug Fixes

    • Graceful preg error handling when parsing names (5c8934c0f2f3be08784e5e393df3821dd169aa0c)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.5(May 2, 2020)

  • v3.6.4(May 2, 2020)

  • v2.6.4(May 2, 2020)

  • v4.1.4(Apr 12, 2020)

  • v3.6.3(Apr 12, 2020)

  • v2.6.3(Apr 12, 2020)

  • v4.1.3(Mar 27, 2020)

    We announce the immediate availability V4.1.3.

    Bug Fixes

    • Recommend the pcre extension ext-pcre (884ab15c7c355b2033d51eb5a38b5835c3b0da28)
    • Fixed allowedValues when not present (#420)
    Source code(tar.gz)
    Source code(zip)
  • v3.6.2(Mar 27, 2020)

    We announce the immediate availability V3.6.2.

    Bug Fixes

    • Recommend the pcre extension ext-pcre (884ab15c7c355b2033d51eb5a38b5835c3b0da28)
    • Fixed allowedValues when not present (#420)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.2(Mar 27, 2020)

  • v4.1.2(Mar 12, 2020)

  • v3.6.1(Mar 12, 2020)

    We announce the immediate availability V3.6.1.

    Bug Fixes

    • Recommend the filter extension ext-filter (124efcd424f395859dcb4096ec3b4d24cd1378f2)
    • Fixed empty variable parsing (82cccaa91f0c7b914c92c13266ceb155d45c1f14)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.1(Mar 1, 2020)

    We announce the immediate availability V4.1.1.

    Bug Fixes

    • Fixed phpdoc errors (fdecd585f1c37b88a70c4a1f44f9ceebab4340e6, f61ce4840a57bd4937f78748aac8d168bb9c100b, 420a2a871e0e35ffb5f3336ddb51a9b547810066)
    • Recommend the filter extension ext-filter (32bd5ca5a4170f88e27073353013d210a3354ae9)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Dec 14, 2019)

    We announce the immediate availability V4.1.0.

    New Features

    • More flexible file finding using stores (#394, #395, #397)
    • Optional variable name whitelist within the loader (#398)

    Changes

    • Improved phpdoc (43586fefce5898513d2aabab784269f431c346d7, #399, c9af33768b9e2c1307579ae15dd1f24377b799b7)
    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Dec 8, 2019)

Owner
Vance Lucas
Co-founder of @techlahoma. Creator of BudgetSheet, Frisby.js, phpdotenv, valitron, and other open-source projects. Engineering Lead/Manager. FT Remote from OKC
Vance Lucas
Symfony Dotenv parses .env files to make environment variables stored in them accessible via getenv(), $_ENV, or $_SERVER.

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

Symfony 3.1k Jun 10, 2021
Simple yet expressive schema-based configuration library for PHP apps

league/config helps you define nested configuration arrays with strict schemas and access configuration values with dot notation.

The League of Extraordinary Packages 46 Jun 15, 2021
PHP client library for the Square Connect APIs

Square Connect PHP SDK - RETIRED replaced by square/square-php-sdk NOTICE: Square Connect PHP SDK retired The Square Connect PHP SDK is retired (EOL)

Square 113 Jun 8, 2021
All PHP functions, rewritten to throw exceptions instead of returning false

Safe PHP This project is deprecated Because of how this project needs to be in sync with the official PHP documentation, maintaining a set of function

TheCodingMachine 1.8k Jun 7, 2021
AWS SDK with readable code and async responses

AsyncAws client If you are one of those people that like the Amazon PHP SDK but hate the fact that you need to download Guzzle, PSR-7 and every AWS AP

Async AWS 300 Jun 15, 2021
A PHP parser for TOML

TOML parser for PHP A PHP parser for TOML compatible with TOML v0.4.0. Support: Installation Requires PHP >= 7.1. Use Composer to install this package

Yo! Symfony 150 May 11, 2021
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

Symfony 6.7k Jun 7, 2021
A beautiful, fully open-source, tunneling service - written in pure PHP

Expose A completely open-source ngrok alternative - written in pure PHP. Documentation For installation instructions, in-depth usage and deployment de

Beyond Code 3.4k Jun 15, 2021
Composer Plugin for simpler registration of Rector extension configs

Rector Extension Installer Composer plugin for automatic installation of Rector extensions. Usage composer require --dev rector/extension-installer In

Rector 10 Jun 8, 2021