Skip to content

Commit 6b28a10

Browse files
[2.x] Supports PHP 8.4 for Roadrunner and FrankenPHP (#964)
* [2.x] Supports PHP 8.4 Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * Apply fixes from StyleCI * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * Update composer.json --------- Signed-off-by: Mior Muhammad Zaki <[email protected]> Co-authored-by: StyleCI Bot <[email protected]>
1 parent 46a8499 commit 6b28a10

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ jobs:
1616
strategy:
1717
fail-fast: true
1818
matrix:
19-
php: [8.1, 8.2, 8.3]
19+
php: [8.1, 8.2, 8.3, 8.4]
2020
laravel: [10, 11]
21-
driver: [swoole, openswoole]
21+
driver: [swoole, openswoole, 'roadrunner/frankenphp']
2222
exclude:
2323
- php: 8.1
2424
laravel: 11
25+
- php: 8.4
26+
laravel: 10
27+
- php: 8.4
28+
driver: swoole
29+
- php: 8.4
30+
driver: openswoole
2531

2632
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.driver }}
2733

@@ -33,19 +39,19 @@ jobs:
3339
uses: shivammathur/setup-php@v2
3440
with:
3541
php-version: ${{ matrix.php }}
36-
extensions: dom, curl, libxml, mbstring, zip, ${{ matrix.driver }}
42+
extensions: dom, curl, libxml, mbstring, zip, ${{ matrix.driver != 'roadrunner/frankenphp' && matrix.driver || '' }}
3743
ini-values: error_reporting=E_ALL
3844
tools: composer:v2
3945
coverage: none
4046

4147
- name: Show extension info
4248
run: |
4349
php --ri ${{ matrix.driver }}
50+
if: matrix.driver != 'roadrunner/frankenphp'
4451

4552
- name: Install dependencies
4653
run: |
47-
composer require "laravel/framework:^${{ matrix.laravel }}" --dev --no-update
48-
composer update --prefer-dist --no-interaction --no-progress
54+
composer update --prefer-dist --no-interaction --no-progress --with="laravel/framework:^${{ matrix.laravel }}"
4955
5056
- name: Execute tests
51-
run: vendor/bin/phpunit
57+
run: vendor/bin/phpunit --display-deprecations --fail-on-deprecation

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"laminas/laminas-diactoros": "^3.0",
1919
"laravel/framework": "^10.10.1|^11.0",
2020
"laravel/prompts": "^0.1.24|^0.2.0|^0.3.0",
21-
"laravel/serializable-closure": "^1.3.0",
21+
"laravel/serializable-closure": "^1.3|^2.0",
2222
"nesbot/carbon": "^2.66.0|^3.0",
2323
"symfony/console": "^6.0|^7.0",
2424
"symfony/psr-http-message-bridge": "^2.2.0|^6.4|^7.0"
@@ -31,7 +31,7 @@
3131
"livewire/livewire": "^2.12.3|^3.0",
3232
"mockery/mockery": "^1.5.1",
3333
"nunomaduro/collision": "^6.4.0|^7.5.2|^8.0",
34-
"orchestra/testbench": "^8.5.2|^9.0",
34+
"orchestra/testbench": "^8.21|^9.0",
3535
"phpstan/phpstan": "^1.10.15",
3636
"phpunit/phpunit": "^10.4",
3737
"spiral/roadrunner-http": "^3.3.0",

tests/OctaneStoreTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
class OctaneStoreTest extends TestCase
1010
{
11+
protected function setUp(): void
12+
{
13+
if (! extension_loaded('openswoole') && ! extension_loaded('swoole')) {
14+
$this->markTestSkipped('Require openswoole/swoole extension');
15+
}
16+
17+
parent::setUp();
18+
}
19+
1120
public function test_can_retrieve_items_from_store(): void
1221
{
1322
$table = $this->createSwooleTable();

tests/TableTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010

1111
class TableTest extends TestCase
1212
{
13+
protected function setUp(): void
14+
{
15+
if (! extension_loaded('openswoole') && ! extension_loaded('swoole')) {
16+
$this->markTestSkipped('Require openswoole/swoole extension');
17+
}
18+
19+
parent::setUp();
20+
}
21+
1322
public function test_it_gets_used_while_creating_an_octane_store()
1423
{
1524
$serverState = ['octaneConfig' => ['cache' => [

tests/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
use PHPUnit\Framework\TestCase as BaseTestCase;
1717
use Swoole\Table;
1818

19+
use function Orchestra\Testbench\default_skeleton_path;
20+
1921
class TestCase extends BaseTestCase
2022
{
2123
protected function createOctaneContext(array $requests)
@@ -37,7 +39,7 @@ protected function createOctaneContext(array $requests)
3739

3840
protected function createApplication()
3941
{
40-
$factory = new ApplicationFactory(realpath(__DIR__.'/../vendor/orchestra/testbench-core/laravel'));
42+
$factory = new ApplicationFactory(default_skeleton_path());
4143

4244
$app = $this->appFactory()->createApplication();
4345

0 commit comments

Comments
 (0)