Skip to content

Fix: Require league/uri-components ^7.6, migrate to Modifier::wrap()#143

Merged
timkelty merged 1 commit into3.xfrom
bugfix/league-uri-modifier-wrap
Mar 25, 2026
Merged

Fix: Require league/uri-components ^7.6, migrate to Modifier::wrap()#143
timkelty merged 1 commit into3.xfrom
bugfix/league-uri-modifier-wrap

Conversation

@timkelty
Copy link
Copy Markdown
Contributor

Summary

  • Bumps league/uri and league/uri-components minimum version from ^7 to ^7.6
  • Migrates all Modifier::from()Modifier::wrap() and ->getUri()->unwrap() calls

Problem

Modifier::wrap() and Modifier::unwrap() were introduced in league/uri-components 7.6.0. The previous ^7 constraint allowed Composer to resolve to any 7.x version (7.0–7.5.x), where these methods don't exist — causing a runtime error:

Call to undefined method League\Uri\Modifier::wrap()
in src/imagetransforms/ImageTransformer.php:57

ImageTransformer was using the new wrap()/unwrap() API while the rest of the codebase (UrlSigner, Fs, AssetManager) was still on the deprecated from()/getUri() API. This PR aligns everything on the current API and enforces the minimum version that supports it.

Changes

File Change
composer.json ^7^7.6 for both league/uri and league/uri-components
src/fs/Fs.php Modifier::from(…)->…->getUri()Modifier::wrap(…)->…->unwrap()
src/UrlSigner.php Modifier::from(…)Modifier::wrap(…)
src/web/AssetManager.php Modifier::from(…)Modifier::wrap(…)
src/imagetransforms/ImageTransformer.php Already correct — no changes

…:from() to wrap()

Modifier::wrap()/unwrap() were added in league/uri-components 7.6.0, replacing the deprecated Modifier::from()/getUri(). The ^7 constraint allowed resolving to pre-7.6 versions where wrap() doesn't exist, causing runtime errors.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@timkelty timkelty merged commit ef69cfd into 3.x Mar 25, 2026
7 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.

1 participant