Skip to content

Drop PHP 7 support - #121

Merged
GrahamCampbell merged 1 commit into
3.0from
drop-php-7-3.0
Nov 20, 2026
Merged

GrahamCampbell merged 1 commit into
3.0from
drop-php-7-3.0

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Member

Guzzle URI Template 3.0 drops PHP 7, so the package now requires PHP ^8.0 and no longer needs symfony/polyfill-php80: the functions it provided are native from PHP 8.0. CI, PHPStan and PHP-CS-Fixer move from 7.4 to 8.0, and the contributor guidelines name the new floor.

The one PHP 7 code path goes with it. Before PHP 8.0 the float-to-string cast followed LC_NUMERIC, so floats were converted through a helper that put the . back under a comma-decimal locale. From 8.0 the cast is locale-independent, which leaves the helper with nothing to do, so it is removed, and the comments and documentation that named the locale as a reason are corrected. Expansion output does not change. The locale test and the CI step that generates a comma-decimal locale stay, because the documentation still promises locale-independent output.

Running PHP-CS-Fixer on PHP 8.0 would start adding a trailing comma to every multiline parameter list. That is switched off here, so that the code keeps its current shape and changes merged up from 2.x, where such a comma is a syntax error on PHP 7.4, do not fail the style check.

The version table gains a row for 3.0, and the changelog and upgrade guide gain their first 3.0 entries.

@GrahamCampbell
GrahamCampbell marked this pull request as ready for review November 20, 2026 00:43
@GrahamCampbell
GrahamCampbell merged commit 35dbacf into 3.0 Nov 20, 2026
22 checks passed
@GrahamCampbell
GrahamCampbell deleted the drop-php-7-3.0 branch November 20, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant