Skip to content

Commit

Permalink
fix, chore: maintenance (#56)
Browse files Browse the repository at this point in the history
* fix: remove deprecation

* chore: fix codestyle and standards

* chore: update license

* chore: refresh composer.json
  • Loading branch information
drupol authored Oct 8, 2024
1 parent f48d4a7 commit ef17bdb
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2019-2023, European Union.
Copyright (c) 2019-2024, European Union.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"require": {
"php": ">= 8.1",
"ergebnis/http-method": "^2.2",
"league/uri-components": "^2 || ^7",
"league/uri-components": "^7",
"loophp/psr17": "^1.0.5",
"php-http/client-common": "^2.6",
"psr/cache": "^1.0.1 || ^2 || ^3",
"psr/cache-implementation": "^1 || ^2",
"psr/http-client": "^1.0",
"psr/http-client": "^1",
"psr/http-client-implementation": "^1",
"psr/http-factory": "^1.0.1",
"psr/http-factory-implementation": "^1",
"psr/http-message": "^1.1",
"psr/http-message": "^1.1 || ^2.0",
"psr/http-message-implementation": "^1",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0"
Expand Down
2 changes: 2 additions & 0 deletions spec/EcPhp/CasLib/Cas.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Contracts\HttpClient\ResponseInterface;

use function sprintf;

class Cas extends ObjectBehavior
{
public static function getHttpClientMock()
Expand Down
8 changes: 4 additions & 4 deletions spec/EcPhp/CasLib/CasSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
class CasSpec extends ObjectBehavior
{
/**
* @var \Psr\Cache\CacheItemPoolInterface
* @var CacheItemPoolInterface
*/
protected $cache;

/**
* @var \Psr\Cache\CacheItemInterface
* @var CacheItemInterface
*/
protected $cacheItem;

/**
* @param \PhpSpec\Wrapper\Collaborator|\Psr\Cache\CacheItemPoolInterface $cache
* @param \PhpSpec\Wrapper\Collaborator|CacheItemPoolInterface $cache
*
* @throws \Psr\Cache\InvalidArgumentException
*/
Expand Down Expand Up @@ -345,7 +345,7 @@ public function it_can_detect_wrong_url(CacheItemPoolInterface $cache)
'base_url' => '',
'protocol' => [
'serviceValidate' => [
'path' => '\?&!@# // \\ http:// foo bar',
'path' => '\?&!@# // \ http:// foo bar',
'default_parameters' => [
'format' => 'XML',
],
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/CasException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Exception;
use Throwable;

use function sprintf;

final class CasException extends Exception implements CasExceptionInterface
{
public static function emptyResponseBodyFailure(): self
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/CasHandlerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
use Psr\Http\Message\ResponseInterface;
use Throwable;

use function sprintf;

final class CasHandlerException extends Exception implements CasExceptionInterface
{
public static function authenticationFailure(AuthenticationFailure $response): self
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/CasResponseBuilderException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

use Exception;

use function sprintf;

final class CasResponseBuilderException extends Exception implements CasExceptionInterface
{
public static function invalidResponseType(): self
Expand Down
1 change: 1 addition & 0 deletions src/Handler/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

use function array_key_exists;
use function is_string;
use function sprintf;

abstract class Handler
{
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function getParams(UriInterface $uri): array
$pairs = [];

try {
$pairs = Query::createFromUri($uri)->pairs();
$pairs = Query::fromUri($uri)->pairs();
} catch (Throwable $exception) {
// Ignore the exception.
}
Expand All @@ -69,7 +69,7 @@ public static function getParams(UriInterface $uri): array
}

/**
* Check wether an URI has the requested parameters.
* Check whether an URI has the requested parameters.
*
* @param UriInterface $uri
* The URI.
Expand Down

0 comments on commit ef17bdb

Please sign in to comment.