Skip to content

Commit e87855f

Browse files
committed
Migrate to guzzlehttp/psr7 v2 compat (PHP 8.4)
Replaces removed procedural functions parse_query() and build_query() with their static method equivalents Query::parse() and Query::build(), which exist in both psr7 ^1.7 and ^2.x. Relaxes the constraint to ^1.7.0 || ^2.0 so consumers (e.g. aws-sdk-php on ^2.4.5) can resolve without conflict.
1 parent 7401107 commit e87855f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"symfony/yaml": "^3.2|^4.3|^5.0",
2121
"nesbot/carbon": "^2.0",
2222
"illuminate/collections": "^10.0 || ^11.0 || ^12.0",
23-
"guzzlehttp/psr7": "^1.7.0",
23+
"guzzlehttp/psr7": "^1.7.0 || ^2.0",
2424
"psr/cache": "^1.0",
2525
"league/flysystem-memory": "^1.0",
2626
"cache/filesystem-adapter": "^1.0",

src/DataStore/DefaultDataStore.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
namespace Okta\DataStore;
1919

2020
use Cache\Adapter\Common\CacheItem;
21-
use function GuzzleHttp\Psr7\build_query;
22-
use function GuzzleHttp\Psr7\parse_query;
21+
use GuzzleHttp\Psr7\Query;
2322
use Http\Client\Common\Plugin\AuthenticationPlugin;
2423
use Http\Client\Common\PluginClient;
2524
use Http\Client\HttpClient;
@@ -383,7 +382,7 @@ private function getQueryString(array $options)
383382
*/
384383
private function appendQueryValues($currentQuery, $queryDictionary)
385384
{
386-
$currentQueryParts = parse_query($currentQuery);
385+
$currentQueryParts = Query::parse($currentQuery);
387386

388387
if ($currentQuery == '') {
389388
$result = [];
@@ -399,7 +398,7 @@ private function appendQueryValues($currentQuery, $queryDictionary)
399398
}
400399

401400
$result = array_replace_recursive($currentQueryParts, $result);
402-
return build_query($result);
401+
return Query::build($result);
403402
}
404403

405404
/**

0 commit comments

Comments
 (0)