Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4']

steps:
# Checkout the repository
Expand All @@ -30,7 +30,7 @@ jobs:
- run: php --version

# Print Composer version
- run: composer --version
- run: composer --version

# Validate composer.json syntax
- name: Validate composer.json syntax
Expand All @@ -46,4 +46,4 @@ jobs:
# Run PHPUnit tests
- name: Run PHPUnit
run: vendor/bin/phpunit
--no-progress
--no-progress
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"php-http/httplug": "^2.4",
"php-http/client-common": "^2.7",
"psr/http-message": "^2.0",
"jumbojett/openid-connect-php": "^1.0",
"jumbojett/openid-connect-php": "dev-master",
"symfony/serializer": "^7.2",
"symfony/property-access": "^7.2",
"json-mapper/json-mapper": "^2.22",
Expand All @@ -36,13 +36,14 @@
},
"require-dev": {
"phpunit/phpunit": "^11.3",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan": "^2.1",
"mockery/mockery": "^1.6",
"squizlabs/php_codesniffer": "^3.10",
"phpcompatibility/php-compatibility": "^9.3",
"symfony/var-dumper": "^7.1",
"guzzlehttp/guzzle": "^7.9",
"vlucas/phpdotenv": "^5.6"
"vlucas/phpdotenv": "^5.6",
"rector/rector": "^2.0"
},
"scripts": {
"analyze": "vendor/bin/phpstan",
Expand Down
8 changes: 8 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return Rector\Config\RectorConfig::configure()
->withPaths([__DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/examples'])
->withPhpVersion(Rector\ValueObject\PhpVersion::PHP_84)
->withRules([
Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector::class,
]);
6 changes: 2 additions & 4 deletions src/Apis/AbstractCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ public function __construct(AbstractResponse ...$items)
* @param AbstractResponse $item The item
* @return void
*/
public function add(mixed $item): void
public function add(AbstractResponse $item): void
{
if ($item instanceof AbstractResponse) {
$this->items[] = $item;
}
$this->items[] = $item;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/EnvironmentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public function getIdpUrl(): string

private function validateEnvironment(?string $environment): bool
{
return isset($environment) && $environment !== null && in_array($environment, ApiEnvironment::asArray());
return isset($environment) && in_array($environment, ApiEnvironment::asArray());
}
}
8 changes: 4 additions & 4 deletions src/HttpClient/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class Builder
private array $plugins = [];

public function __construct(
ClientInterface $httpClient = null,
RequestFactoryInterface $requestFactory = null,
StreamFactoryInterface $streamFactory = null,
UriFactoryInterface $uriFactory = null
?ClientInterface $httpClient = null,
?RequestFactoryInterface $requestFactory = null,
?StreamFactoryInterface $streamFactory = null,
?UriFactoryInterface $uriFactory = null
) {
$this->httpClient = $httpClient ?? Psr18ClientDiscovery::find();
$this->requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory();
Expand Down
4 changes: 2 additions & 2 deletions tests/Endpoints/BaseEndpointTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class BaseEndpointTestCase extends TestCase
{
private DataProviderInterface $provider;

public function __construct(string $name)
protected function setUp(): void
{
parent::setUp();
$this->initDataProvider();
parent::__construct($name);
}

private function initDataProvider(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/Endpoints/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getData(mixed $param = null): array
/**
* @param array<int, mixed>|null $requests
*/
public function createClientHandler(?array $requests = [], ?MockHandler &$mock = null): SeravoApiClient
public function createClientHandler(?array $requests = [], ?MockHandler $mock = null): SeravoApiClient
{
$mock = new MockHandler($requests);
return new SeravoApiClient(
Expand Down