Skip to content

Commit ce4246c

Browse files
authored
Merge pull request #17 from packagist/php-8.4
PHP 8.4 support
2 parents 991e861 + 5f95cef commit ce4246c

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,19 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]
13+
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
16+
1617
- name: Install PHP ${{ matrix.php }}
1718
uses: "shivammathur/setup-php@v2"
1819
with:
1920
coverage: "none"
2021
ini-values: "memory_limit=-1, phar.readonly=0"
2122
php-version: ${{ matrix.php }}
2223

23-
- name: "Determine composer cache directory"
24-
id: "determine-composer-cache-directory"
25-
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
26-
27-
- name: "Cache dependencies installed with composer"
28-
uses: "actions/cache@v1"
29-
with:
30-
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
31-
key: "php-${{ matrix.php }}-ci"
32-
restore-keys: "php-${{ matrix.php }}"
24+
- name: Install dependencies
25+
uses: ramsey/composer-install@v3
3326

3427
- name: "Install dependencies"
3528
run: composer update --no-progress -o --prefer-dist

lib/Bitbucket/API/Api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Api
4949
* @param OptionalClientOption $options
5050
* @param ClientInterface $client
5151
*/
52-
public function __construct(array $options = array(), ClientInterface $client = null)
52+
public function __construct(array $options = array(), ?ClientInterface $client = null)
5353
{
5454
$this->httpClient = (null !== $client) ? $client : new Client($options, null);
5555

lib/Bitbucket/API/Http/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Client implements ClientInterface
5151
/**
5252
* @param OptionalClientOption $options
5353
*/
54-
public function __construct(array $options = array(), HttpPluginClientBuilder $httpClientBuilder = null)
54+
public function __construct(array $options = array(), ?HttpPluginClientBuilder $httpClientBuilder = null)
5555
{
5656
$this->responseHistory = new HistoryPlugin();
5757
$this->options = array_merge(array_merge($this->options, $options));

lib/Bitbucket/API/Http/HttpPluginClientBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HttpPluginClientBuilder
3030
/**
3131
* @param MessageFactory|RequestFactoryInterface|null $requestFactory
3232
*/
33-
public function __construct(ClientInterface $httpClient = null, $requestFactory = null, StreamFactoryInterface $streamFactory = null)
33+
public function __construct(?ClientInterface $httpClient = null, $requestFactory = null, ?StreamFactoryInterface $streamFactory = null)
3434
{
3535
$requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory();
3636
if ($requestFactory instanceof MessageFactory) {

lib/Bitbucket/API/Http/Plugin/ApiVersionPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct($version)
2727
* @param callable $next Next middleware in the chain, the request is passed as the first argument
2828
* @param callable $first First middleware in the chain, used to to restart a request
2929
*
30-
* @return Promise<ResponseInterface> Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient).
30+
* @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient).
3131
*/
3232
protected function doHandleRequest(RequestInterface $request, callable $next, callable $first)
3333
{

lib/Bitbucket/API/Http/Response/Pager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
HttpPluginClientBuilder $httpPluginClientBuilder,
3939
ResponseInterface $response,
4040
$messageFactory = null,
41-
StreamFactoryInterface $streamFactory = null
41+
?StreamFactoryInterface $streamFactory = null
4242
) {
4343
/** @var ResponseInterface $response */
4444
if ($response->getStatusCode() >= 400) {

0 commit comments

Comments
 (0)