Skip to content

Commit

Permalink
fix: Replace league/uri-query-parser with league/uri-components.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 24, 2022
1 parent 2c0a71b commit 167aade
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 12 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "ecphp/cas-lib",
"type": "library",
"description": "CAS Lib, a standard library for CAS authentication.",
"license": "BSD-3-Clause",
"type": "library",
"keywords": [
"authentication",
"cas",
"psr",
"single-sign-on"
],
"license": "BSD-3-Clause",
"require": {
"php": ">= 7.4",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"league/uri-query-parser": "^1.0",
"league/uri-components": "^2",
"openlss/lib-array2xml": "^1.0",
"psr/cache": "^1.0.1",
"psr/http-client": "^1.0",
Expand Down Expand Up @@ -50,6 +50,15 @@
"tests\\EcPhp\\CasLib\\": "./tests/"
}
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"ergebnis/composer-normalize": true,
"infection/extension-installer": true,
"phpro/grumphp": true,
"phpstan/extension-installer": true
}
},
"scripts": {
"changelog-unreleased": "docker-compose run auto_changelog -c .auto-changelog -u",
"changelog-version": "docker-compose run auto_changelog -c .auto-changelog -v",
Expand Down
6 changes: 2 additions & 4 deletions src/Utils/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@

namespace EcPhp\CasLib\Utils;

use League\Uri\Parser\QueryString;
use League\Uri\Components\Query;
use Psr\Http\Message\UriInterface;

use const PHP_QUERY_RFC1738;

/**
* Class Uri.
*/
Expand All @@ -31,7 +29,7 @@ public static function getParam(UriInterface $uri, string $param, ?string $defau
*/
public static function getParams(UriInterface $uri): array
{
return QueryString::extract($uri->getQuery(), '&', PHP_QUERY_RFC1738);
return iterator_to_array(Query::createFromUri($uri)->pairs());
}

/**
Expand Down

0 comments on commit 167aade

Please sign in to comment.