Skip to content

Freeze trim characters ahead of PHP 8.6#751

Merged
GrahamCampbell merged 1 commit into
1.16from
trim-characters
Jul 6, 2026
Merged

Freeze trim characters ahead of PHP 8.6#751
GrahamCampbell merged 1 commit into
1.16from
trim-characters

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Member

PHP 8.6 adds the form feed character to the default $characters set of trim, ltrim, and rtrim, so calls relying on the default would change behavior there. This change passes the pre-8.6 set explicitly at the six call sites that relied on it, in the Linux binary auto-discovery, keyboard key normalization, and the browser process output handling, keeping behavior identical on every PHP version. An audit of the rest of the package found nothing else to fix: the remaining patterns already carry the PCRE D modifier or use no end anchor, and every preg_match failure path fails closed.

@GrahamCampbell GrahamCampbell merged commit ab657b9 into 1.16 Jul 6, 2026
40 checks passed
@GrahamCampbell GrahamCampbell deleted the trim-characters branch July 6, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant