Skip to content

Commit b5016b8

Browse files
authored
Merge pull request #70 from KentarouTakeda/php-version
Add PHP 8.4 and 8.3 to CI Configuration and Update GitHub Actions Versions
2 parents 3a6d9a0 + c4619a3 commit b5016b8

8 files changed

+21
-16
lines changed

.github/workflows/ci.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ jobs:
1717
php-version:
1818
- "8.1"
1919
- "8.2"
20+
- "8.3"
21+
- "8.4"
2022
dependencies:
2123
- "lowest"
2224
- "highest"
25+
exclude:
26+
- php-version: "8.4"
27+
dependencies: "lowest"
2328

2429
steps:
2530
- name: "Checkout"
26-
uses: "actions/checkout@v2"
31+
uses: "actions/checkout@v4"
2732
with:
2833
fetch-depth: 2
2934

@@ -35,15 +40,15 @@ jobs:
3540
ini-values: "zend.assertions=1"
3641

3742
- name: "Install dependencies with Composer"
38-
uses: "ramsey/composer-install@v2"
43+
uses: "ramsey/composer-install@v3"
3944
with:
4045
dependency-versions: "${{ matrix.dependencies }}"
4146

4247
- name: "Run PHPUnit"
4348
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
4449

4550
- name: "Upload coverage file"
46-
uses: "actions/upload-artifact@v2"
51+
uses: "actions/upload-artifact@v4"
4752
with:
4853
name: "phpunit-${{ matrix.dependencies }}-${{ matrix.php-version }}.coverage"
4954
path: "coverage.xml"
@@ -56,17 +61,17 @@ jobs:
5661

5762
steps:
5863
- name: "Checkout"
59-
uses: "actions/checkout@v2"
64+
uses: "actions/checkout@v4"
6065
with:
6166
fetch-depth: 2
6267

6368
- name: "Download coverage files"
64-
uses: "actions/download-artifact@v2"
69+
uses: "actions/download-artifact@v4"
6570
with:
6671
path: "reports"
6772

6873
- name: "Upload to Codecov"
69-
uses: "codecov/codecov-action@v1"
74+
uses: "codecov/codecov-action@v3"
7075
with:
7176
directory: reports
7277

@@ -81,7 +86,7 @@ jobs:
8186

8287
steps:
8388
- name: "Checkout"
84-
uses: "actions/checkout@v2"
89+
uses: "actions/checkout@v4"
8590

8691
- name: "Install PHP"
8792
uses: "shivammathur/setup-php@v2"
@@ -91,7 +96,7 @@ jobs:
9196
tools: "cs2pr"
9297

9398
- name: "Install dependencies with Composer"
94-
uses: "ramsey/composer-install@v2"
99+
uses: "ramsey/composer-install@v3"
95100

96101
- name: "Install php-cs-fixer"
97102
run: composer require "friendsofphp/php-cs-fixer:^3.23"

lib/promise-adapter/src/Adapter/GuzzleHttpPromiseAdapter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class GuzzleHttpPromiseAdapter implements PromiseAdapterInterface
2929
*
3030
* @return Promise
3131
*/
32-
public function create(&$resolve = null, &$reject = null, callable $canceller = null)
32+
public function create(&$resolve = null, &$reject = null, ?callable $canceller = null)
3333
{
3434
$queue = Utils::queue();
3535
$promise = new Promise([$queue, 'run'], $canceller);

lib/promise-adapter/src/Adapter/ReactPromiseAdapter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ReactPromiseAdapter implements PromiseAdapterInterface
2929
*
3030
* @return Promise
3131
*/
32-
public function create(&$resolve = null, &$reject = null, callable $canceller = null)
32+
public function create(&$resolve = null, &$reject = null, ?callable $canceller = null)
3333
{
3434
$deferred = new Deferred($canceller);
3535

lib/promise-adapter/src/Adapter/WebonyxGraphQLSyncPromiseAdapter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class WebonyxGraphQLSyncPromiseAdapter implements PromiseAdapterInterface
3030
*/
3131
private $webonyxPromiseAdapter;
3232

33-
public function __construct(SyncPromiseAdapter $webonyxPromiseAdapter = null)
33+
public function __construct(?SyncPromiseAdapter $webonyxPromiseAdapter = null)
3434
{
3535
$webonyxPromiseAdapter = $webonyxPromiseAdapter?:new SyncPromiseAdapter();
3636
$this->setWebonyxPromiseAdapter($webonyxPromiseAdapter);
@@ -55,7 +55,7 @@ public function setWebonyxPromiseAdapter(SyncPromiseAdapter $webonyxPromiseAdapt
5555
/**
5656
* {@inheritdoc}
5757
*/
58-
public function create(&$resolve = null, &$reject = null, callable $canceller = null)
58+
public function create(&$resolve = null, &$reject = null, ?callable $canceller = null)
5959
{
6060
$promise = $this->webonyxPromiseAdapter->create(function ($res, $rej) use (&$resolve, &$reject) {
6161
$resolve = $res;

lib/promise-adapter/src/PromiseAdapterInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface PromiseAdapterInterface
2525
*
2626
* @return TPromise a Promise
2727
*/
28-
public function create(&$resolve = null, &$reject = null, callable $canceller = null);
28+
public function create(&$resolve = null, &$reject = null, ?callable $canceller = null);
2929

3030
/**
3131
* Creates a full filed Promise for a value if the value is not a promise.

src/DataLoader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class DataLoader implements DataLoaderInterface
4545
*/
4646
private $promiseAdapter;
4747

48-
public function __construct(callable $batchLoadFn, PromiseAdapterInterface $promiseFactory, Option $options = null)
48+
public function __construct(callable $batchLoadFn, PromiseAdapterInterface $promiseFactory, ?Option $options = null)
4949
{
5050
$this->batchLoadFn = $batchLoadFn;
5151
$this->promiseAdapter = $promiseFactory;

tests/AbuseTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function testAwaitWithoutNoInstance()
124124
* @param callable $batchLoadFn
125125
* @return DataLoader
126126
*/
127-
private static function idLoader(callable $batchLoadFn = null)
127+
private static function idLoader(?callable $batchLoadFn = null)
128128
{
129129
if (null === $batchLoadFn) {
130130
$batchLoadFn = function ($keys) {

tests/DataLoadTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ private static function eventLoader()
894894
});
895895
}
896896

897-
private static function idLoader(Option $options = null, callable $batchLoadFnCallBack = null)
897+
private static function idLoader(?Option $options = null, ?callable $batchLoadFnCallBack = null)
898898
{
899899
$loadCalls = new \ArrayObject();
900900
if (null === $batchLoadFnCallBack) {

0 commit comments

Comments
 (0)