Skip to content

Commit e2b569d

Browse files
authored
Add support for Laravel 12.x (#18)
* Add support for Laravel 12.x * Update data providers
1 parent b431b20 commit e2b569d

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.github/workflows/run-tests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,23 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: ['8.4', '8.3', '8.2', '8.1']
13-
laravel: [11.*, 10.*]
12+
php: [8.1, 8.2, 8.3, 8.4]
13+
laravel: [10.*, 11.*, 12.*]
1414
dependency-version: [prefer-lowest, prefer-stable]
1515
exclude:
1616
- laravel: 11.*
1717
php: 8.1
18+
- laravel: 12.*
19+
php: 8.1
20+
- laravel: 12.*
21+
php: 8.2
1822
include:
19-
- laravel: 11.*
20-
testbench: ^9.0
2123
- laravel: 10.*
2224
testbench: ^8.0
25+
- laravel: 11.*
26+
testbench: ^9.0
27+
- laravel: 12.*
28+
testbench: ^10.0
2329

2430
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
2531

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
},
2626
"require-dev": {
2727
"mockery/mockery": "^1.5",
28-
"orchestra/testbench": "^8.0|^9.0",
29-
"phpunit/phpunit": "^10.5"
28+
"orchestra/testbench": "^8.0|^9.0|^10.0",
29+
"phpunit/phpunit": "^10.5|^11.5.3"
3030
},
3131
"autoload": {
3232
"psr-4": {

tests/Unit/Charts/BarChartTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Fidum\VaporMetricsTile\Stores\VaporEnvironmentMetricsStore;
88
use Fidum\VaporMetricsTile\Tests\TestCase;
99
use Illuminate\Support\Collection;
10+
use PHPUnit\Framework\Attributes\DataProvider;
1011

1112
class BarChartTest extends TestCase
1213
{
@@ -60,7 +61,7 @@ public function testChartWithSettings()
6061
);
6162
}
6263

63-
/** @dataProvider unitProvider */
64+
#[DataProvider('unitProvider')]
6465
public function testUnit(string $period, string $expectedUnit)
6566
{
6667
config()->set('dashboard.tiles.vapor_metrics.period', $period);
@@ -71,7 +72,7 @@ public function testUnit(string $period, string $expectedUnit)
7172
$this->assertSame($this->expectedOptions($expectedUnit), $chart->options);
7273
}
7374

74-
public function unitProvider(): array
75+
public static function unitProvider(): array
7576
{
7677
//1m, 5m, 30m, 1h, 8h, 1d (default), 3d, 7d, 1M
7778
return [

0 commit comments

Comments
 (0)