Skip to content

Commit 9faef00

Browse files
committed
Added PHP 8.5 compatibility.
1 parent 2dd99fc commit 9faef00

File tree

9 files changed

+11
-12
lines changed

9 files changed

+11
-12
lines changed

.github/workflows/Tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- 8.2
2020
- 8.3
2121
- 8.4
22+
- 8.5
2223
dependencies:
2324
- hi
2425
- lo

composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
"scriptfusion/static-class": "^1"
1919
},
2020
"require-dev": {
21-
"amphp/amp": "^3-beta.9",
22-
"infection/infection": ">=0.26.16,<0.27",
21+
"infection/infection": ">=0.32,<0.33",
2322
"mockery/mockery": "^1.5",
24-
"phpunit/phpunit": "^9.5.23",
25-
"revolt/event-loop": "^0.2"
23+
"phpunit/phpunit": "^9.5.23"
2624
},
2725
"suggest" : {
2826
"connectors/http": "Provides an HTTP connector for Porter providers.",

src/Connector/CachingConnector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CachingConnector implements Connector, ConnectorWrapper
1818

1919
public function __construct(
2020
private Connector $connector,
21-
CacheItemPoolInterface $cache = null
21+
?CacheItemPoolInterface $cache = null
2222
) {
2323
$this->cache = $cache ?: new MemoryCache;
2424
}

src/ProviderNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
final class ProviderNotFoundException extends \RuntimeException
1010
{
11-
public function __construct(string $message, \Exception $previous = null)
11+
public function __construct(string $message, ?\Exception $previous = null)
1212
{
1313
parent::__construct($message, 0, $previous);
1414
}

test/FixtureFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ final class FixtureFactory
1616

1717
public static function buildImportConnector(
1818
Connector $connector,
19-
RecoverableExceptionHandler $recoverableExceptionHandler = null,
20-
Provider $provider = null,
19+
?RecoverableExceptionHandler $recoverableExceptionHandler = null,
20+
?Provider $provider = null,
2121
int $maxFetchAttempts = Import::DEFAULT_FETCH_ATTEMPTS,
2222
bool $mustCache = false
2323
): ImportConnector {

test/Integration/Connector/ImportConnectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function testUserAndResourceRecoverableExceptionHandlers(): void
177177
/**
178178
* Creates a closure that only throws an exception on the first invocation.
179179
*/
180-
private static function createExceptionThrowingClosure(\Exception $exception = null): \Closure
180+
private static function createExceptionThrowingClosure(?\Exception $exception = null): \Closure
181181
{
182182
return static function () use ($exception): void {
183183
static $invocationCount;

test/Integration/PorterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function setUp(): void
6868
$this->singleImport = new Import($this->singleResource);
6969
}
7070

71-
private function registerProvider(Provider $provider, string $name = null): void
71+
private function registerProvider(Provider $provider, ?string $name = null): void
7272
{
7373
$name ??= \get_class($provider);
7474

test/MockFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function mockProvider(): Provider|MockInterface
3939
;
4040
}
4141

42-
public static function mockResource(Provider $provider, \Iterator $return = null, bool $single = false)
42+
public static function mockResource(Provider $provider, ?\Iterator $return = null, bool $single = false)
4343
: ProviderResource|MockInterface
4444
{
4545
/** @var ProviderResource|MockInterface $resource */

test/infection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"timeout": 10,
33
"source": {
44
"directories": [
5-
"src"
5+
"../src"
66
]
77
},
88
"phpUnit": {

0 commit comments

Comments
 (0)