Download the PHP package justbetter/dotenv without Composer

On this page you can find all versions of the php package justbetter/dotenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dotenv

Magento 2 DotEnv loader

Adds support for .env configuration files to Magento 2. Variables in the .env file are used to fill in app/etc/env.php variables. This file can be added to source control when using this package. I think having more than one environment file is weird.

Credits

Credits to this package which inspired me to make this package.

Installation

Extending the environments

You can override specific environments with the APP_ENV variable in the dot env filename. example. Copy the file to app/etc/ and modify for any specified environment.

You can also load additional .env files by defining them in LOAD_BEFORE (allowing the values in these files to be overridden) or LOAD_AFTER (allowing the values in these files to override all others) with your extra .env files you would like to load.

Disabled the writer to env.php

Because of the Writer class of magento 2 the env.php get rewrited every time. I disabled this functionality because the env.php file is not static. The cache types are not reset every time when you run bin/magento setup:upgrade.

Compatibility

The module is tested on Magento version 2.4.x

Ideas, bugs or suggestions?

Please create a issue or a pull request.

About us

We’re a innovative development agency from The Netherlands building awesome websites, webshops and web applications with Laravel and Magento. Check out our website justbetter.nl and our open source projects.

License

MIT


JustBetter logo


All versions of dotenv with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
magento/framework Version *
vlucas/phpdotenv Version ^5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justbetter/dotenv contains the following files

Loading the files please wait ....