Skip to content

Commit f4dfe37

Browse files
authored
Merge pull request #33 from bilfeldt/upgrades/php84
Add PHP 8.4 support and remove Laravel 8 support
2 parents b9aae0e + aa99eb5 commit f4dfe37

File tree

6 files changed

+33
-39
lines changed

6 files changed

+33
-39
lines changed

.github/workflows/run-tests.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ on:
1010

1111
jobs:
1212
test:
13-
runs-on: ${{ matrix.os }}
13+
runs-on: ubuntu-latest
1414

1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-latest, windows-latest]
19-
php: [8.3, 8.2, 8.1, 8.0]
20-
laravel: ['11.*', '10.*', '9.*', '8.*']
18+
php: [8.4, 8.3, 8.2, 8.1, 8.0]
19+
laravel: ['11.*', '10.*', '9.*']
2120
stability: [prefer-stable]
2221
include:
2322
- laravel: 11.*
@@ -26,21 +25,25 @@ jobs:
2625
testbench: 8.*
2726
- laravel: 9.*
2827
testbench: 7.*
29-
- laravel: 8.*
30-
testbench: 6.*
3128
exclude:
29+
- laravel: 9.*
30+
php: 8.3
31+
- laravel: 9.*
32+
php: 8.4
3233
- laravel: 10.*
3334
php: 8.0
35+
- laravel: 10.*
36+
php: 8.4
3437
- laravel: 11.*
3538
php: 8.0
3639
- laravel: 11.*
3740
php: 8.1
3841

39-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
42+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
4043

4144
steps:
4245
- name: Checkout code
43-
uses: actions/checkout@v2
46+
uses: actions/checkout@v4
4447

4548
- name: Setup PHP
4649
uses: shivammathur/setup-php@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ testbench.yaml
1212
vendor
1313
node_modules
1414
.php-cs-fixer.cache
15+
.DS_Store

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
20-
"illuminate/contracts": "^8.51 || ^9.0 || ^10.0 || ^11.0"
19+
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
20+
"illuminate/contracts": "^9.0 || ^10.0 || ^11.0"
2121
},
2222
"require-dev": {
23-
"nunomaduro/collision": "^5.3 || ^6.0 || ^7.0 || ^8.0",
24-
"orchestra/testbench": "^6.15 || ^7.0 || ^8.0 || ^9.0",
25-
"phpunit/phpunit": "^9.3 || ^10.0",
26-
"spatie/laravel-ray": "^1.23"
23+
"nunomaduro/collision": "^6.0 || ^7.0 || ^8.0",
24+
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
25+
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0"
2726
},
2827
"autoload": {
2928
"psr-4": {

phpunit.xml.dist

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,28 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
55
backupGlobals="false"
6-
backupStaticAttributes="false"
76
bootstrap="vendor/autoload.php"
87
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
128
processIsolation="false"
139
stopOnFailure="false"
1410
executionOrder="random"
1511
failOnWarning="true"
1612
failOnRisky="true"
1713
failOnEmptyTestSuite="true"
1814
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
15+
displayDetailsOnPhpunitDeprecations="true"
2016
>
2117
<testsuites>
22-
<testsuite name="Bilfeldt Test Suite">
23-
<directory>tests</directory>
18+
<testsuite name="tests">
19+
<directory suffix="Test.php">tests</directory>
2420
</testsuite>
2521
</testsuites>
26-
<coverage>
22+
<logging>
23+
<junit outputFile="build/report.junit.xml"/>
24+
</logging>
25+
<source>
2726
<include>
2827
<directory suffix=".php">./src</directory>
2928
</include>
30-
<report>
31-
<html outputDirectory="build/coverage"/>
32-
<text outputFile="build/coverage.txt"/>
33-
<clover outputFile="build/logs/clover.xml"/>
34-
</report>
35-
</coverage>
36-
<logging>
37-
<junit outputFile="build/report.junit.xml"/>
38-
</logging>
29+
</source>
3930
</phpunit>

tests/AlertTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
use Bilfeldt\LaravelFlashMessage\Message;
66
use Bilfeldt\LaravelFlashMessage\View\Components\Alert;
7+
use PHPUnit\Framework\Attributes\DataProvider;
8+
use PHPUnit\Framework\Attributes\Test;
79

810
class AlertTest extends \Bilfeldt\LaravelFlashMessage\Tests\TestCase
911
{
10-
public function provideLevels()
12+
public static function provideLevels()
1113
{
1214
return [
1315
[Message::LEVEL_MESSAGE],
@@ -18,9 +20,8 @@ public function provideLevels()
1820
];
1921
}
2022

21-
/**
22-
* @dataProvider provideLevels
23-
*/
23+
#[Test]
24+
#[DataProvider('provideLevels')]
2425
public function test_can_show_message(string $level): void
2526
{
2627
$view = $this->component(Alert::class, [
@@ -31,9 +32,8 @@ public function test_can_show_message(string $level): void
3132
$view->assertSee('role="alert"', false);
3233
}
3334

34-
/**
35-
* @dataProvider provideLevels
36-
*/
35+
#[Test]
36+
#[DataProvider('provideLevels')]
3737
public function test_can_render_message(string $level): void
3838
{
3939
$view = $this->blade('<x-flash::alert :level="$level" :text="$text" />', [

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
77
use Orchestra\Testbench\TestCase as Orchestra;
88

9-
class TestCase extends Orchestra
9+
abstract class TestCase extends Orchestra
1010
{
1111
use InteractsWithViews;
1212

0 commit comments

Comments
 (0)