Skip to content

re #228 fix(dist): allow psr/http-message ^1.1 in univeros/http and univeros/cookie - #229

Merged
tonydspaniard merged 1 commit into
masterfrom
fix/228-http-cookie-psr7-constraint
Jun 6, 2026
Merged

re #228 fix(dist): allow psr/http-message ^1.1 in univeros/http and univeros/cookie#229
tonydspaniard merged 1 commit into
masterfrom
fix/228-http-cookie-psr7-constraint

Conversation

@tonydspaniard

Copy link
Copy Markdown
Member

Closes #228.

Problem

composer require univeros/http — and therefore any module scaffolded by bin/altair module:new (it requires the split univeros/http) — fails to resolve:

- neomerx/cors-psr7 require psr/http-message ^1.0
- univeros/http require neomerx/cors-psr7 ^3.0 AND psr/http-message ^2.0
- You can only install one version of psr/http-message[1.0, 1.0.1, 1.1, 2.0]

Root cause

univeros/http and univeros/cookie pin psr/http-message: ^2.0, but their own transitive deps cap the graph at PSR-7 v1:

  • neomerx/cors-psr7psr/http-message ^1.0
  • relay/relaypsr/http-message ~1.0

The framework genuinely runs on psr/http-message 1.1 (MessageInterface::getProtocolVersion() has no return type → v1.x; CI green). The monorepo root, laminas/laminas-diactoros 3.8, guzzle, and the sibling Altair packages (Idempotency/Webhooks/Observatory/Observability) already use ^1.1 || ^2.0http and cookie were the only outliers. The bug was hidden because the monorepo replaces the splits (their constraints ignored) and host apps depend on the univeros/framework bundle (root constraint already ^1.1 || ^2.0); a module that requires the split univeros/http directly is the first consumer to hit it.

Fix

- "psr/http-message": "^2.0"
+ "psr/http-message": "^1.1 || ^2.0"

in src/Altair/Http/composer.json and src/Altair/Cookie/composer.json. No code change — resolution is unchanged (neomerx/relay still pin the graph to 1.1), proven by composer update --dry-run (no psr/http-message movement) and a green cache-free cs/stan/rector locally.

Distinct from #209's longer-term work to replace/fork neomerx/cors-psr7 and move fully to psr/http-message ^2.0.

Test plan

  • Both composer.json schema-valid; monorepo resolution unchanged (still 1.1).
  • cache-free composer cs / composer stan (level 8) / composer rector — clean.
  • CI: tests 8.3 + 8.4, Static Analysis, Determinism gate.
  • Post-release (v2.5.1 + split): composer require univeros/http resolves in a fresh project; bin/altair module:newcomposer install succeeds.

…niveros/cookie

univeros/http and univeros/cookie pinned psr/http-message ^2.0, which can never
be satisfied alongside their own transitive deps neomerx/cors-psr7 (^1.0) and
relay/relay (~1.0) — both PSR-7 v1 only. So both splits were uninstallable as
standalone published packages: `composer require univeros/http` (and any module
scaffolded by `bin/altair module:new`) failed to resolve.

The framework already runs on psr/http-message 1.1 (MessageInterface::
getProtocolVersion has no return type → PSR-7 v1.x; CI is green on it). The
monorepo root, laminas/laminas-diactoros 3.8, guzzle, and the sibling Altair
packages (Idempotency/Webhooks/Observatory/Observability) all use ^1.1 || ^2.0;
http and cookie were the only outliers. The bug stayed hidden because the
monorepo `replace`s the splits and host apps depend on the univeros/framework
bundle (root constraint already ^1.1 || ^2.0).

Loosen both to `^1.1 || ^2.0`. No code change — resolution is unchanged
(neomerx/relay still cap the graph at 1.1). Distinct from the longer-term #209
work to replace neomerx and move fully to psr/http-message ^2.0.
@tonydspaniard
tonydspaniard merged commit 228fa79 into master Jun 6, 2026
4 checks passed
@tonydspaniard
tonydspaniard deleted the fix/228-http-cookie-psr7-constraint branch June 6, 2026 19:39
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.

dist: univeros/http and univeros/cookie are uninstallable standalone (psr/http-message ^2.0 vs neomerx/relay)

1 participant