Skip to content

feat: Upgrade to php 8.5, php-utils 3.x, and guzzlehttp/psr7 v2 or v3 - #6

Merged
acoulton merged 6 commits into
2.xfrom
1.x-bump-deps
Nov 4, 2026
Merged

acoulton merged 6 commits into
2.xfrom
1.x-bump-deps

Conversation

@acoulton

@acoulton acoulton commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Bump the base PHP and php-utils version requirements, and add support for newer Guzzle.

I've made the guzzle dependency support either v2 or v3 of guzzlehttp/psr7 to avoid dependency conflicts for end-user projects which may not yet be able to update to guzzlehttp/guzzle v8 if they have their own dependencies that need v7.

@acoulton acoulton changed the title feat: Support guzzzlehttp/psr7 version 3.x feat: Upgrade dependencies Nov 4, 2026
Optionally support either 2.x or 3.x. Note that one of the tests was
coupled to Guzzle's default user-agent header, which we don't control.
This now uses a hardcoded string in the test instead.
For stricter typing and new PHP compatibility.
If the response has begun to be sent before the exception (for
example, when checking for multiple response header values) then
the `HTTP/{proto} {status} {reason}` header might already have been
queued. Calling http_response_code after this has no effect, and causes
a warning on >= PHP 8.5.

Since we are already setting a Content-Type header in this handler, the
simplest solution is to set the response_code in that same call, which
will update the HTTP header string that's already been set.

Note that this change alters the line numbers in the main microframework
file, which breaks the (probably too brittle) test for the log output as
the stack trace line numbers have changed.
Previously this was not tested, because the base image we're using
for tests does not include locales other than the default `C` (POSIX)
locales, and therefore `setlocale` would not apply any custom locale.
@acoulton acoulton changed the title feat: Upgrade dependencies feat: Upgrade to php 8.5, php-utils 3.x, and guzzlehttp/psr7 v2 or v3 Nov 4, 2026
@acoulton
acoulton added this pull request to stack #8 November 4, 2026 10:15
@acoulton
acoulton removed this pull request from stack #8 November 4, 2026 13:07
@acoulton
acoulton changed the base branch from 1.x to 2.x November 4, 2026 13:08
@acoulton
acoulton added this pull request to stack #11 November 4, 2026 13:08
@acoulton
acoulton requested a review from craig410 November 4, 2026 13:19
@acoulton

acoulton commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@craig410 I've targeted this to a new 2.x series, as there are some BC breaks in method signatures in the later PRs and I think we're as well to bump the whole library at this point?

@acoulton
acoulton merged commit 23404bb into 2.x Nov 4, 2026
4 checks passed
@acoulton
acoulton deleted the 1.x-bump-deps branch November 4, 2026 16:27
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.

2 participants