Skip to content

Fix league/uri 7.6+ breakage by normalizing WSDL location to absolute#35

Merged
veewee merged 2 commits intophp-soap:mainfrom
veewee:fix/absolute-wsdl-location
Apr 24, 2026
Merged

Fix league/uri 7.6+ breakage by normalizing WSDL location to absolute#35
veewee merged 2 commits intophp-soap:mainfrom
veewee:fix/absolute-wsdl-location

Conversation

@veewee
Copy link
Copy Markdown
Member

@veewee veewee commented Apr 24, 2026

Summary

  • league/uri >= 7.6 throws when resolving a relative reference against a non-absolute base, which broke FlatteningLoader when users passed a relative WSDL path (fixes league/uri 7.6 breaks the package #29).
  • Normalize the incoming $location once at the FlatteningLoader entry: scheme-bearing URIs (http, https, file, ...) pass through untouched; filesystem paths are resolved via realpath(); non-existent filesystem paths throw UnloadableWsdlException.
  • IncludePathBuilder stays as-is — its existing starts_with($fromFile, '/') branch now always matches for filesystem inputs.

Test plan

  • vendor/bin/phpunit — full suite green (77/77)
  • New FlatteningLoaderTest cases:
    • relative path + chdir resolves correctly
    • file:// URI is forwarded untouched
    • non-existing relative path throws UnloadableWsdlException
    • data-provider validates the scheme regex for http, https, file, ftp, svn+ssh, x.y, x-y, and mixed-case via a capturing WsdlLoader using Psl\Ref

veewee added 2 commits April 24, 2026 10:45
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.
@veewee veewee merged commit 84b63a5 into php-soap:main Apr 24, 2026
6 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.

league/uri 7.6 breaks the package

1 participant