[Bug]: Locale Variable Changes After PHP Update Cause Inconsistent Output
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- php
- 领域
- backend, localization
调研方向
首先,在 macOS 上使用 PHP 8.2.27、8.3.17 和 8.4.4 重现报告中的差异,并将终端中的 locale 输出与 localeconv() 进行比较。确定 PHP runtime 是否继承了 macOS 的 locale,并明确预期的一致行为;该 issue 未指出需要更新的源文件或测试。
由索引模型根据 Issue 内容生成。
描述
Platform
macOS
Operating system version
15.3 (24D60)
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.14.1
PHP Version
Last Version of PHP 8.3.17 and 8.4.4
Bug description
After updating PHP to its latest versions (8.4.4 and 8.3.17), the default value of the locale variables changed. PHP started using the locale variables from the OSX operating system. In my case, this becomes a problem because the software I work with does not have the same locale settings as mine.
I know there are several ways to solve this through PHP code using setlocale, but the strange thing is that when I run the tests in PhpStorm, I still get the previous output(PHP 8.2.27).
Steps to reproduce
At terminal, when i run locale
I get the output below
LANG="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_CTYPE="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_ALL=
When i dump localeconv();
PHP 8.2.27
array:18 [
"decimal_point" => "."
"thousands_sep" => ""
"int_curr_symbol" => ""
"currency_symbol" => ""
"mon_decimal_point" => ""
"mon_thousands_sep" => ""
"positive_sign" => ""
"negative_sign" => ""
"int_frac_digits" => 127
"frac_digits" => 127
"p_cs_precedes" => 127
"p_sep_by_space" => 127
"n_cs_precedes" => 127
"n_sep_by_space" => 127
"p_sign_posn" => 127
"n_sign_posn" => 127
"grouping" => []
"mon_grouping" => []
]
PHP 8.3.17 and 8.4.4
array:18 [
"decimal_point" => ","
"thousands_sep" => "."
"int_curr_symbol" => "BRL "
"currency_symbol" => "R$"
"mon_decimal_point" => ","
"mon_thousands_sep" => "."
"positive_sign" => ""
"negative_sign" => "-"
"int_frac_digits" => 2
"frac_digits" => 2
"p_cs_precedes" => 0
"p_sep_by_space" => 1
"n_cs_precedes" => 0
"n_sep_by_space" => 1
"p_sign_posn" => 1
"n_sign_posn" => 1
"grouping" => array:2 [
0 => 3
1 => 3
]
"mon_grouping" => array:2 [
0 => 3
1 => 3
]
]
Relevant log output
- 主要语言
- 没有语言数据
- 星标
- 124
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
beyondcode/herd-community 的其他 Issue
-
[Bug]: PHP 8.3 php.ini missing auto_prepend_file and herd-ext extension lines (dump() undefined)未关闭macOS
难度 2/5 1-3 小时 新手友好度 68/100
beyondcode/herd-community#1693 ·
-
macOS
难度 2/5 1-3 小时 新手友好度 72/100
beyondcode/herd-community#1602 ·
-
[Bug]: 1.30.2 creates PHP 8.2 config and ~/.zshrc lines on every start, although 8.2 isn't installed未关闭fixed-in-next-release macOS
难度 3/5 1-2 天 新手友好度 56/100
beyondcode/herd-community#1763 · 2 条评论 ·
-
fixed-in-next-release macOS
难度 3/5 1-2 天 新手友好度 58/100
beyondcode/herd-community#1760 ·
-
macOS
难度 4/5 3-5 天 新手友好度 35/100
beyondcode/herd-community#1755 ·
查看 beyondcode/herd-community 的全部 Issue
相似的 Issue
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.text可能已有人在做 @ManojDevarajulu 今天认领。 未关闭possible bug
难度 2/5 1-3 小时 新手友好度 82/100
Mintplex-Labs/anything-llm#6737 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
ibm-granite/granite.build#504 ·
维护者通常 2 天内回复
-
area/plugin good first issue
难度 2/5 1-3 小时 新手友好度 88/100
kestra-io/plugin-kestra#200 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 72/100
api-platform/core#8690 ·
维护者通常 1 天内回复