Fix: Require league/uri-components ^7.6, migrate to Modifier::wrap()#143
Merged
Fix: Require league/uri-components ^7.6, migrate to Modifier::wrap()#143
Conversation
…: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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
league/uriandleague/uri-componentsminimum version from^7to^7.6Modifier::from()→Modifier::wrap()and->getUri()→->unwrap()callsProblem
Modifier::wrap()andModifier::unwrap()were introduced inleague/uri-components7.6.0. The previous^7constraint allowed Composer to resolve to any 7.x version (7.0–7.5.x), where these methods don't exist — causing a runtime error:ImageTransformerwas using the newwrap()/unwrap()API while the rest of the codebase (UrlSigner,Fs,AssetManager) was still on the deprecatedfrom()/getUri()API. This PR aligns everything on the current API and enforces the minimum version that supports it.Changes
composer.json^7→^7.6for bothleague/uriandleague/uri-componentssrc/fs/Fs.phpModifier::from(…)->…->getUri()→Modifier::wrap(…)->…->unwrap()src/UrlSigner.phpModifier::from(…)→Modifier::wrap(…)src/web/AssetManager.phpModifier::from(…)→Modifier::wrap(…)src/imagetransforms/ImageTransformer.php