Skip to content

PHP 8.4 support #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2025
Merged
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
17 changes: 5 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install PHP ${{ matrix.php }}
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
ini-values: "memory_limit=-1, phar.readonly=0"
php-version: ${{ matrix.php }}

- name: "Determine composer cache directory"
id: "determine-composer-cache-directory"
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
with:
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
key: "php-${{ matrix.php }}-ci"
restore-keys: "php-${{ matrix.php }}"
- name: Install dependencies
uses: ramsey/composer-install@v3

- name: "Install dependencies"
run: composer update --no-progress -o --prefer-dist
Expand Down
2 changes: 1 addition & 1 deletion lib/Bitbucket/API/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Api
* @param OptionalClientOption $options
* @param ClientInterface $client
*/
public function __construct(array $options = array(), ClientInterface $client = null)
public function __construct(array $options = array(), ?ClientInterface $client = null)
{
$this->httpClient = (null !== $client) ? $client : new Client($options, null);

Expand Down
2 changes: 1 addition & 1 deletion lib/Bitbucket/API/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Client implements ClientInterface
/**
* @param OptionalClientOption $options
*/
public function __construct(array $options = array(), HttpPluginClientBuilder $httpClientBuilder = null)
public function __construct(array $options = array(), ?HttpPluginClientBuilder $httpClientBuilder = null)
{
$this->responseHistory = new HistoryPlugin();
$this->options = array_merge(array_merge($this->options, $options));
Expand Down
2 changes: 1 addition & 1 deletion lib/Bitbucket/API/Http/HttpPluginClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class HttpPluginClientBuilder
/**
* @param MessageFactory|RequestFactoryInterface|null $requestFactory
*/
public function __construct(ClientInterface $httpClient = null, $requestFactory = null, StreamFactoryInterface $streamFactory = null)
public function __construct(?ClientInterface $httpClient = null, $requestFactory = null, ?StreamFactoryInterface $streamFactory = null)
{
$requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory();
if ($requestFactory instanceof MessageFactory) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Bitbucket/API/Http/Plugin/ApiVersionPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct($version)
* @param callable $next Next middleware in the chain, the request is passed as the first argument
* @param callable $first First middleware in the chain, used to to restart a request
*
* @return Promise<ResponseInterface> Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient).
* @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient).
*/
protected function doHandleRequest(RequestInterface $request, callable $next, callable $first)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Bitbucket/API/Http/Response/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(
HttpPluginClientBuilder $httpPluginClientBuilder,
ResponseInterface $response,
$messageFactory = null,
StreamFactoryInterface $streamFactory = null
?StreamFactoryInterface $streamFactory = null
) {
/** @var ResponseInterface $response */
if ($response->getStatusCode() >= 400) {
Expand Down