[Bug]: Locale Variable Changes After PHP Update Cause Inconsistent Output
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- php
- Ambito
- backend, localization
Direzione di ricerca
Inizia riproducendo la differenza segnalata con PHP 8.2.27, 8.3.17 e 8.4.4 su macOS, confrontando l'output di locale nel terminale con localeconv(). Determina se il runtime PHP sta ereditando la locale di macOS e stabilisci quale sia il comportamento coerente atteso; l'issue non identifica alcun file sorgente o test da aggiornare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 124
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di beyondcode/herd-community
-
[Bug]: PHP 8.3 php.ini missing auto_prepend_file and herd-ext extension lines (dump() undefined)ApertamacOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
beyondcode/herd-community#1693 ·
-
macOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 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 installedApertafixed-in-next-release macOS
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
beyondcode/herd-community#1763 · 2 commenti ·
-
fixed-in-next-release macOS
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
beyondcode/herd-community#1760 ·
-
macOS
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
beyondcode/herd-community#1755 ·
Tutte le issue di beyondcode/herd-community
Issue simili
-
afk-ok area:data-quality importer size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
enorm-labs/event-junkie#3301 ·
I maintainer di solito rispondono entro 1 giorno
-
Awaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
processing/p5.js-web-editor#4364 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
one-zero-eight/apply-bot#39 ·
-
UX
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
mediajunkie/piper-morgan-product#2008 · 2 commenti ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno