Fix league/uri 7.6+ breakage by normalizing WSDL location to absolute#35
Merged
veewee merged 2 commits intophp-soap:mainfrom Apr 24, 2026
Merged
Conversation
league/uri >= 7.6 throws when resolving a relative reference against a non-absolute base URI, which broke FlatteningLoader for relative WSDL paths (see php-soap#29). Normalize the incoming location once at the FlatteningLoader entry: leave scheme-bearing URIs (http, https, file, ...) untouched, resolve filesystem paths through realpath(), and throw UnloadableWsdlException for non-existent paths. IncludePathBuilder remains untouched.
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
FlatteningLoaderwhen users passed a relative WSDL path (fixes league/uri 7.6 breaks the package #29).$locationonce at theFlatteningLoaderentry: scheme-bearing URIs (http, https, file, ...) pass through untouched; filesystem paths are resolved viarealpath(); non-existent filesystem paths throwUnloadableWsdlException.IncludePathBuilderstays as-is — its existingstarts_with($fromFile, '/')branch now always matches for filesystem inputs.Test plan
vendor/bin/phpunit— full suite green (77/77)FlatteningLoaderTestcases:chdirresolves correctlyfile://URI is forwarded untouchedUnloadableWsdlExceptionhttp,https,file,ftp,svn+ssh,x.y,x-y, and mixed-case via a capturingWsdlLoaderusingPsl\Ref