Skip to content

Add PHP 8.4 support and remove Laravel 8 support #33

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 6 commits into from
Jan 27, 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
19 changes: 11 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ on:

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1, 8.0]
laravel: ['11.*', '10.*', '9.*', '8.*']
php: [8.4, 8.3, 8.2, 8.1, 8.0]
laravel: ['11.*', '10.*', '9.*']
stability: [prefer-stable]
include:
- laravel: 11.*
Expand All @@ -26,21 +25,25 @@ jobs:
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
exclude:
- laravel: 9.*
php: 8.3
- laravel: 9.*
php: 8.4
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 8.4
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ testbench.yaml
vendor
node_modules
.php-cs-fixer.cache
.DS_Store
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
}
],
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"illuminate/contracts": "^8.51 || ^9.0 || ^10.0 || ^11.0"
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"illuminate/contracts": "^9.0 || ^10.0 || ^11.0"
},
"require-dev": {
"nunomaduro/collision": "^5.3 || ^6.0 || ^7.0 || ^8.0",
"orchestra/testbench": "^6.15 || ^7.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^9.3 || ^10.0",
"spatie/laravel-ray": "^1.23"
"nunomaduro/collision": "^6.0 || ^7.0 || ^8.0",
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0"
},
"autoload": {
"psr-4": {
Expand Down
25 changes: 8 additions & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,28 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
displayDetailsOnPhpunitDeprecations="true"
>
<testsuites>
<testsuite name="Bilfeldt Test Suite">
<directory>tests</directory>
<testsuite name="tests">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
<coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
</source>
</phpunit>
14 changes: 7 additions & 7 deletions tests/AlertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

use Bilfeldt\LaravelFlashMessage\Message;
use Bilfeldt\LaravelFlashMessage\View\Components\Alert;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Test;

class AlertTest extends \Bilfeldt\LaravelFlashMessage\Tests\TestCase
{
public function provideLevels()
public static function provideLevels()
{
return [
[Message::LEVEL_MESSAGE],
Expand All @@ -18,9 +20,8 @@ public function provideLevels()
];
}

/**
* @dataProvider provideLevels
*/
#[Test]
#[DataProvider('provideLevels')]
public function test_can_show_message(string $level): void
{
$view = $this->component(Alert::class, [
Expand All @@ -31,9 +32,8 @@ public function test_can_show_message(string $level): void
$view->assertSee('role="alert"', false);
}

/**
* @dataProvider provideLevels
*/
#[Test]
#[DataProvider('provideLevels')]
public function test_can_render_message(string $level): void
{
$view = $this->blade('<x-flash::alert :level="$level" :text="$text" />', [
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
use Orchestra\Testbench\TestCase as Orchestra;

class TestCase extends Orchestra
abstract class TestCase extends Orchestra
{
use InteractsWithViews;

Expand Down
Loading