PHPackages                             zepgram/magento-dotenv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zepgram/magento-dotenv

ActiveMagento2-component[Utility &amp; Helpers](/categories/utility)

zepgram/magento-dotenv
======================

Simple autoloader to integrate the Symfony Dotenv component into Magento2

2.0.3(2y ago)1371.3k—5.9%1MITPHPPHP &gt;=8.0.2

Since Feb 27Pushed 2y ago3 watchersCompare

[ Source](https://github.com/zepgram/magento-dotenv)[ Packagist](https://packagist.org/packages/zepgram/magento-dotenv)[ RSS](/packages/zepgram-magento-dotenv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

Magento Dotenv
==============

[](#magento-dotenv)

Simple autoloader to integrate Symfony Dotenv component to Magento2. The implementation can be found under path `app/dotenv.php` and can be configured safely for your needs.

Compatibility
=============

[](#compatibility)

Magento Dotenvv1.\*v2.\*Symfony Dotenv^5.0^5.4 / ^6.0PHP version^7.0^8.0Installation
============

[](#installation)

```
composer require zepgram/magento-dotenv

```

How to
======

[](#how-to)

You can use it similar way as a Symfony project:

1. If .env exists, it is loaded first. In case there's no .env file but a .env.dist, this one will be loaded instead.
2. If one of the previously mentioned files contains the APP\_ENV variable, the variable is populated and used to load environment-specific files hereafter. If APP\_ENV is not defined in either of the previously mentioned files, dev is assumed for APP\_ENV and populated by default.
3. If there's a .env.local representing general local environment variables it's loaded now.
4. If there's a .env.$env.local file, this one is loaded. Otherwise, it falls back to .env.$env.

You can freely edit `app/dotenv.php`: this file will be not updated.

For more information you can follow the documentation:

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity66

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~240 days

Recently: every ~314 days

Total

7

Last Release

827d ago

Major Versions

0.0.1 → 1.0.02020-08-26

1.0.1 → 2.0.02022-04-01

PHP version history (2 changes)0.0.1PHP ^7.0

2.0.0PHP &gt;=8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/66547185afcb495a48d0dd0defd547999fb057dd042d3615dc95955cffc81b42?d=identicon)[zepgram](/maintainers/zepgram)

---

Tags

environment-variablesmagento-dotenvmagento2symfony-dotenvenvironmentenvdotenvmagento2

### Embed Badge

![Health badge](/badges/zepgram-magento-dotenv/health.svg)

```
[![Health](https://phpackages.com/badges/zepgram-magento-dotenv/health.svg)](https://phpackages.com/packages/zepgram-magento-dotenv)
```

###  Alternatives

[vlucas/phpdotenv

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

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.3k](/packages/symfony-dotenv)[diarmuidie/envpopulate

Tool to interactively populate a `.env` file based on an `.env.example` file whenever Composer installs or updates.

1892.0k](/packages/diarmuidie-envpopulate)[nystudio107/dotenvy

Speed up your production sites by ditching .env for key/value variable pairs as Apache, Nginx, and shell equivalents.

326.9k](/packages/nystudio107-dotenvy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
