Environment: remove the shared/config/env.php fallback
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- php
- 领域
- backend, documentation, testing
调研方向
Read the environment selection logic in packages/environment/ and the tests that cover it, then check the 3.3 upgrade guide and changelog. Remove the shared/config/env.php fallback and its deprecation, preserving the stated --env, APP_ENV, then production order and .env file choice. Done means the listed behavior and tests match the issue, the core test fixture no longer contains tests/_root/shared/config/env.php, and the docs describe the new order.
由索引模型根据 Issue 内容生成。
描述
Summary
#714 (3.2.0) chooses the environment from --env, then APP_ENV from the real environment, then app_env in shared/config/env.php, deprecated, then production. This ticket removes the deprecated fallback.
Proposed change
- The environment name comes from the first of:
--env=<name>on aphp qtcommand,APP_ENVfrom the real environment,production. shared/config/env.phpis no longer read, and the deprecation from #714 is removed with it.- The file choice is unchanged:
production→.env, any other name →.env.<name>. - No
APP_ENVinside.env: the environment is chosen before a file is loaded. A developer's machine keeps its own.env(it is not committed), so local values need no separate environment name;.env.<name>files are for choosing between several environments on one machine, such as tests (APP_ENV=testinginphpunit.xml).
Breaking changes
An application that still chooses its environment in shared/config/env.php runs as production and loads .env, until it sets APP_ENV (or --env). Changelog BREAKING entry and an upgrade-guide note for 3.3, pointing to the deprecation logged since 3.2.0.
Tests
- With
env.phppresent and no--env/APP_ENV, the environment isproductionand the file is not read. --envandAPP_ENVwork as in #714.- The core's tests no longer have
tests/_root/shared/config/env.php.
Docs
packages/environment/ and the 3.3 upgrade guide: the order without env.php.
Depends on
#714
- 主要语言
- PHP
- 星标
- 44
- 派生
- 22
- 平均合并
- 2 小时 57 分钟
- 30 天内合并 PR
- 52
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quantum-php/framework 的其他 Issue
-
tech debt testing
难度 2/5 1-3 小时 新手友好度 72/100
quantum-php/framework#696 ·
维护者通常 1 天内回复
-
routing testing
难度 2/5 1-3 小时 新手友好度 76/100
quantum-php/framework#547 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 45/100
quantum-php/framework#714 ·
维护者通常 1 天内回复
-
refactoring tech debt
难度 4/5 3-5 天 新手友好度 68/100
quantum-php/framework#712 ·
维护者通常 1 天内回复
-
refactoring tech debt
难度 5/5 一周以上 新手友好度 20/100
quantum-php/framework#693 ·
维护者通常 1 天内回复
查看 quantum-php/framework 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
ExpressionEngine/ExpressionEngine#5493 ·
维护者通常 5 天内回复
-
"Attempt to read property 'username' on null" error after a user is deleted可能已有人在做 @dicksonlaw583 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
omeka/plugin-SimplePages#49 ·
-
not confirmed
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复