Upgrade to league/uri 7.6 - #823
Merged
Merged
Conversation
league/uri 7.6 is stricter in its validation logic for the URI resolution algorithm to enforce behavior of the RFC3986. This implements the other cases supported by Dart's URI resolution algorithm in our own utility. This bumps the min version of league/uri to version 7.6 as supporting both versions 7.5 and 7.6 in this new logic is harder.
phpstan does not report those errors anymore.
Member
Author
|
The TODOs will be done separately as they are not blockers. |
1 task
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.
league/uriperforms 3 changes that are meaningful for us:resolvealgorithm. This makes it match the behavior of theresolvemethod in ext-uri in PHP 8.5. This means that the case 3 described in Ensure that the URI resolution semantic is consistent with Dart #819 is no longer provided for us byleague/uri, which is what this PR needs to implement.BaseUri::resolve(alongside the wholeBaseUriclass) in favor ofUri::resolve(and a futureUriInterface::resolve).UriStringthat were previously only private (or maybe protected) inBaseUri, which are part of the resolution algorithm. I currently rely onUriString::removeDotSegmentsto implement the new logic for some paths, which is what would make it hard to keep support forleague/uri7.5 as is.TODO:
UriString::removeDotSegmentsdirectly could be refactored to also be implemented in term ofresolvewith a modified base url followed by some URL manipulation. This would make it possible to keep support forleague/uri7.5 (and so to merge this change before theleague/uristable release), and would also make that code ready for a (far) future where a new major version of scssphp would useUri\Rfc3986\Urias its URI representation.