Skip to content

Allow guzzlehttp/psr7 3 - #44

Merged
tvdijen merged 1 commit into
simplesamlphp:release-2.xfrom
sinemacula-ben:allow-psr7-3
Nov 22, 2026
Merged

tvdijen merged 1 commit into
simplesamlphp:release-2.xfrom
sinemacula-ben:allow-psr7-3

Conversation

@sinemacula-ben

@sinemacula-ben sinemacula-ben commented Nov 22, 2026 •

Copy link
Copy Markdown

Guzzle 8 requires guzzlehttp/psr7 3. The 2.x line pins psr7 to ~2.8, so any application on saml2 v6 is held on Guzzle 7, and an application already on Guzzle 8 is downgraded when it installs saml2:

- simplesamlphp/saml2[v6.2.5, ..., v6.3.3] require simplesamlphp/assert ~2.0
- simplesamlphp/assert v2.0.2 requires guzzlehttp/psr7 ~2.8
- guzzlehttp/guzzle[8.0.1, ..., 8.5.5] require guzzlehttp/psr7 ^3.0 (8.5.3 and later ^3.5.1)

This widens the constraint to ~2.8 || ^3.0. URITrait only constructs Uri and catches MalformedUriException, and both are unchanged in psr7 3.

Tested

Branch PHP psr7 2.13.6 psr7 3.6.0
release-2.x 8.3.37 50 tests OK 50 tests OK
release-2.x 8.5.8 50 tests OK, 1 deprecation same
bugfix/1.8.4 (~2.7, the same change) 8.5.8 51 tests OK, 1 deprecation same

PHPStan reports no errors with either major. The deprecation is ReflectionMethod::setAccessible() in AssertTest, which PHP 8.5 deprecates. It is unrelated to psr7.

Behaviour with psr7 3

psr7 3 parses URIs more strictly, so validURI(), validURL() and validURN() reject a few values that 2.x accepted. Each of them is already invalid under RFC 3986:

  • a scheme that does not start with a letter (1http://x);
  • a malformed IP literal (http://[zz]/);
  • an invalid percent-encoding in the host (https://exa%zzmple.com).

IPv6 hosts are also written in their short form (http://[0:0:0:0:0:0:0:1]/ becomes http://[::1]/).

Other lines

  • The 1.x line pins ~2.7 (v1.8.4, from bugfix/1.8.4; there is no release-1.x branch). saml2 v5 and xml-common 1.x reach psr7 through it. The same change passes there, as the table shows. I can open it against whichever branch you release 1.x from.
  • 3.x and master do not require psr7.
  • xml-common's 2.7 and 2.8 lines pin ~2.8 too. That change is Allow guzzlehttp/psr7 3 xml-common#102.

@tvdijen
tvdijen merged commit 97eeeac into simplesamlphp:release-2.x Nov 22, 2026
20 of 26 checks passed
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