PHPackages                             qbhy/hyperf-multi-env - 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. qbhy/hyperf-multi-env

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

qbhy/hyperf-multi-env
=====================

v3.1.0(2y ago)287.4k↓50%52MITPHPPHP &gt;=8.1

Since Jun 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/qbhy/hyperf-multi-env)[ Packagist](https://packagist.org/packages/qbhy/hyperf-multi-env)[ RSS](/packages/qbhy-hyperf-multi-env/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (10)Used By (2)

hyperf-multi-env
================

[](#hyperf-multi-env)

hyperf 框架多 env 文件支持

安装 - install
------------

[](#安装---install)

```
$ composer require qbhy/hyperf-multi-env
```

使用 - usage
----------

[](#使用---usage)

只需要启动的时候设置 APP\_ENV 配置，扩展包就会自动根据 env 来查找 env 文件配置。

比如 APP\_ENV 为 `testing` 那么会加载 `.env.testing` 文件配置。

> `.env.testing` 没有的配置，还是会使用 `.env` 文件的配置来加载。所以建议 .env 放共有的配置。

示例 - examples
-------------

[](#示例---examples)

- 通过 `.env` 配置 ```
    APP_ENV=local
    ```
- 命令行直接启动 ```
    $ export APP_ENV=production && php bin/hyperf.php start
    ```

    > 有环境变量污染的可能性，请小心使用
- docker 启动 ```
    $ docker run --env APP_ENV=production -d -p 9501:9501 your-image
    ```
- phpunit ```

    ```

hyperf学习交流请加QQ群: 873213948

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 76.5% 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 ~168 days

Recently: every ~336 days

Total

9

Last Release

811d ago

Major Versions

v1.2 → v2.02020-06-22

v2.1.1 → v3.1.02024-02-27

PHP version history (2 changes)v1.0PHP &gt;=7.2

v3.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0e15ef096c1cef56717d13b05333600e4fb13d2c91ddd0aaffb9a550f2543d3?d=identicon)[qbhy](/maintainers/qbhy)

---

Top Contributors

[![qbhy](https://avatars.githubusercontent.com/u/24204533?v=4)](https://github.com/qbhy "qbhy (13 commits)")[![DlenoDing](https://avatars.githubusercontent.com/u/24222722?v=4)](https://github.com/DlenoDing "DlenoDing (2 commits)")[![tim0991](https://avatars.githubusercontent.com/u/26053904?v=4)](https://github.com/tim0991 "tim0991 (2 commits)")

---

Tags

phphyperf

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/qbhy-hyperf-multi-env/health.svg)

```
[![Health](https://phpackages.com/badges/qbhy-hyperf-multi-env/health.svg)](https://phpackages.com/packages/qbhy-hyperf-multi-env)
```

PHPackages © 2026

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