Skip to content

Commit

Permalink
Merge pull request #13 from simoheinonen/uri7_with_drop_old_lib
Browse files Browse the repository at this point in the history
Require league/uri 7
  • Loading branch information
veewee authored Nov 20, 2023
2 parents 4576557 + 81decbf commit 4767af9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"php": "~8.1.0 || ~8.2.0",
"ext-dom": "*",
"azjezz/psl": "^2.1",
"league/uri": "^6.5",
"league/uri-components": "^2.4",
"league/uri": "^7.0",
"league/uri-components": "^7.0",
"php-soap/xml": "^1.4",
"symfony/console": "^5.4|^6.0",
"veewee/xml": "~2.2"
Expand Down
19 changes: 8 additions & 11 deletions src/Uri/IncludePathBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@

namespace Soap\Wsdl\Uri;

use League\Uri\Uri;
use League\Uri\UriModifier;
use League\Uri\UriResolver;
use League\Uri\BaseUri;
use League\Uri\Modifier;

final class IncludePathBuilder
{
public static function build(string $relativePath, string $fromFile): string
{
return UriModifier::removeEmptySegments(
UriModifier::removeDotSegments(
UriResolver::resolve(
Uri::createFromString($relativePath),
Uri::createFromString($fromFile)
)
)
)->__toString();
return Modifier::from(BaseUri::from($fromFile)->resolve($relativePath))
->removeDotSegments()
->removeEmptySegments()
->getUri()
->__toString()
;
}
}

0 comments on commit 4767af9

Please sign in to comment.