Skip to content

Commit 0c29168

Browse files
authored
[5.x] PHP 8.5 Compatibility (#1667)
* [5.x] PHP 8.5 Compatibility 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]> --------- Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent d086072 commit 0c29168

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: true
2525
matrix:
26-
php: [8.1, 8.2, 8.3, 8.4]
26+
php: [8.1, 8.2, 8.3, 8.4, 8.5]
2727
laravel: [10, 11, 12]
2828
include:
2929
- php: '8.0'
@@ -39,6 +39,10 @@ jobs:
3939
laravel: 12
4040
- php: 8.4
4141
laravel: 10
42+
- php: 8.5
43+
laravel: 10
44+
- php: 8.5
45+
laravel: 11
4246

4347
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
4448

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
},
2727
"require-dev": {
2828
"mockery/mockery": "^1.0",
29-
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",
29+
"orchestra/testbench": "^7.55|^8.36|^9.15|^10.8",
3030
"phpstan/phpstan": "^1.10|^2.0",
31-
"phpunit/phpunit": "^9.0|^10.4|^11.5|^12.0",
3231
"predis/predis": "^1.1|^2.0|^3.0"
3332
},
3433
"suggest": {
@@ -62,6 +61,9 @@
6261
}
6362
},
6463
"config": {
64+
"audit": {
65+
"block-insecure": false
66+
},
6567
"sort-packages": true
6668
},
6769
"minimum-stability": "dev",

tests/Feature/RedisPayloadTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ public function test_tags_are_correctly_determined_for_listeners()
125125
$this->assertEquals([FakeModel::class.':42'], $JobPayload->decoded['tags']);
126126
}
127127

128-
/**
129-
* @requires PHP 7.4
130-
*/
131128
public function test_tags_are_correctly_determined_for_listeners_with_property_types()
132129
{
133130
$JobPayload = new JobPayload(json_encode(['id' => 1]));

tests/Feature/SupervisorCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ private function myNiceness()
3737
{
3838
$pid = getmypid();
3939

40-
return (int) trim(`ps -p $pid -o nice=`);
40+
return (int) trim(shell_exec("ps -p {$pid} -o nice="));
4141
}
4242
}

tests/Feature/SupervisorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Laravel\Horizon\Tests\IntegrationTest;
2323
use Laravel\Horizon\WorkerCommandString;
2424
use Mockery;
25+
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
2526

2627
class SupervisorTest extends IntegrationTest
2728
{
@@ -50,6 +51,7 @@ protected function tearDown(): void
5051
}
5152

5253
/** @requires extension redis */
54+
#[RequiresPhpExtension('redis')]
5355
public function test_supervisor_can_start_worker_process_with_given_options()
5456
{
5557
Queue::push(new Jobs\BasicJob);
@@ -262,6 +264,7 @@ public function test_supervisor_can_restart_processes()
262264
}
263265

264266
/** @requires extension redis */
267+
#[RequiresPhpExtension('redis')]
265268
public function test_processes_can_be_paused_and_continued()
266269
{
267270
$options = $this->supervisorOptions();

0 commit comments

Comments
 (0)