diff --git a/AGENTS.md b/AGENTS.md index 8ce3ee5..620a8f8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,10 @@ where they are accepted and we need to cast to a string, we should branch on `\is_finite($value)`, using `(string) $value` for the finite case and `\is_nan($value) ? 'NAN' : ($value > 0 ? 'INF' : '-INF')` otherwise. +- Never call `strtolower()`, `strtoupper()`, `strcasecmp()`, `stripos()`, or + other locale-sensitive case functions; use the locale-independent + `GuzzleHttp\Psr7\Utils::asciiToLower()`, `asciiToUpper()`, + `caselessEquals()`, and `caselessContains()` helpers instead. - Changes in behavior need a `CHANGELOG.md` entry in the unreleased section of the target branch and an `UPGRADING.md` note when the behavior differs between major versions.