walkor / walkor/webman-framework
env 环境覆盖问题
- Dominant language
- PHP
- Stars
- 148
- Forks
- 68
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 3
Description
v1.5.1 中将原来的 `createUnsafeImmutable` 改成了 `createUnsafeMutable`,这会导致逻辑变更:
Immutable 会以系统环境中的 env 为主,.env 为辅
Mutable 会以.env 为主,系统环境中的 env 为辅
请问这改动是否符合改动预期
个人认为 Immutable 的形式应该更符合使用需求,因为一般在 docker 环境,会通过 env 覆盖 .env 的配置的
如果符合预期,这块目前有没有什么办法能做到动态改变 env 的使用模式
目前使用的折中办法:在 docker 环境下,如果通过 env 传递,那 .env 就不要配置这个参数
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the v1.5.1 change from `createUnsafeImmutable` to `createUnsafeMutable` and trace how system environment variables and `.env` values are loaded. Compare the behavior in a Docker environment, then determine whether the precedence change is intentional and what an explicit dynamic mode would require; done should include a confirmed behavior or an agreed change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100