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 天內回覆