PHPackages                             abacaphiliac/zend-phpdotenv - 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. abacaphiliac/zend-phpdotenv

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abacaphiliac/zend-phpdotenv
===========================

ZF2 Module that loads vlucas/phpdotenv

0.2.2(9y ago)439.0k↓41.2%2[1 issues](https://github.com/abacaphiliac/zend-phpdotenv/issues)[1 PRs](https://github.com/abacaphiliac/zend-phpdotenv/pulls)MITPHP

Since Feb 26Pushed 9y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (10)Versions (9)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d97e3bec886dd848160e3b149bbf961224845aece8ed3915576edf5c580661e8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61626163617068696c6961632f7a656e642d706870646f74656e762f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/abacaphiliac/zend-phpdotenv/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/5e9c5cb4a93c938b23fe728cbe4f073a807c5350f3f8293b3e3f23df4555b82c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61626163617068696c6961632f7a656e642d706870646f74656e762f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/abacaphiliac/zend-phpdotenv/?branch=master)[![Build Status](https://camo.githubusercontent.com/d7ba3703c9c4b6bb10a60763a4a27ee2107640f0ba3be1a0a55687a808c2d548/68747470733a2f2f7472617669732d63692e6f72672f61626163617068696c6961632f7a656e642d706870646f74656e762e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/abacaphiliac/zend-phpdotenv)

zend-phpdotenv
==============

[](#zend-phpdotenv)

ZF2 Module that loads [vlucas/phpdotenv](https://github.com/vlucas/phpdotenv).

Module attaches a listener to `EVENT_LOAD_MODULE` on ModuleManager's EventManager to load environment variables while the module is loaded.

Installation
============

[](#installation)

```
composer require abacaphiliac/zend-phpdotenv
```

Usage
=====

[](#usage)

1. Add `Abacaphiliac\ZendPhpDotEnv` to your ZF2 application module config.
2. Create a `.env` file in the root directory of your ZF2 application.
3. Use `getenv()` anywhere in your code (or config) to pull environment variables.

Dependencies
============

[](#dependencies)

php &gt;=5.3.9 and ZF &gt;=2

See [composer.json](composer.json).

Contributing
------------

[](#contributing)

```
composer install && vendor/bin/phing

```

This library attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

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 ~33 days

Total

5

Last Release

3603d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29004cd917fdd7e4a8cc4ddba16f0bbcd90829513c57fc96e3b4f3fcb53f7ead?d=identicon)[abacaphiliac](/maintainers/abacaphiliac)

---

Top Contributors

[![abacaphiliac](https://avatars.githubusercontent.com/u/1656273?v=4)](https://github.com/abacaphiliac "abacaphiliac (14 commits)")[![SlashBin](https://avatars.githubusercontent.com/u/3208101?v=4)](https://github.com/SlashBin "SlashBin (4 commits)")

---

Tags

zendenvironmentenvdotenvmodulezf2

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/abacaphiliac-zend-phpdotenv/health.svg)

```
[![Health](https://phpackages.com/badges/abacaphiliac-zend-phpdotenv/health.svg)](https://phpackages.com/packages/abacaphiliac-zend-phpdotenv)
```

###  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)[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)[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)[zepgram/magento-dotenv

Simple autoloader to integrate the Symfony Dotenv component into Magento2

1371.3k](/packages/zepgram-magento-dotenv)

PHPackages © 2026

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