Skip to content

Commit

Permalink
Added support for PHP 8.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilge committed Nov 23, 2024
1 parent 3d77c11 commit 6ba5a56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
- 8.1
- 8.2
- 8.3
- 8.4
dependencies:
- hi
- lo

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Stunnel
run: sudo apt-get install --yes stunnel
Expand All @@ -39,7 +40,7 @@ jobs:

- name: Cache dependencies
id: composer-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor
key: php-${{ matrix.php }}-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}
Expand Down
7 changes: 5 additions & 2 deletions src/HttpConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ class HttpConnector implements Connector

private ConnectionPool $pool;

public function __construct(HttpOptions $options = null, TlsOptions $tlsOptions = null, CookieJar $cookieJar = null)
{
public function __construct(
?HttpOptions $options = null,
?TlsOptions $tlsOptions = null,
?CookieJar $cookieJar = null,
) {
$this->options = $options ?: new HttpOptions;
$this->cookieJar = $cookieJar ?: new LocalCookieJar();
$this->pool = new UnlimitedConnectionPool($tlsOptions ? new DefaultConnectionFactory(
Expand Down
4 changes: 2 additions & 2 deletions test/FixtureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public static function createResponse(
int $status = 200,
?string $reason = 'OK',
array $headers = [],
ReadableStream $body = null,
Request $request = null,
?ReadableStream $body = null,
?Request $request = null,
): Response {
return new Response(
$protocolVersion,
Expand Down

0 comments on commit 6ba5a56

Please sign in to comment.