Skip to content

Commit 9971d4e

Browse files
committed
- Adding Laravel 13 support
1 parent 299361c commit 9971d4e

28 files changed

+126
-206
lines changed

.github/workflows/run-tests.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ jobs:
1717
matrix:
1818
os: [ ubuntu-latest ]
1919
php: [ 8.4, 8.3, 8.2, 8.1 ]
20-
laravel: [ 12.*, 11.*, 10.*, 9.* ]
20+
laravel: [ 13.*, 12.*, 11.*, 10.*, 9.* ]
2121
stability: [ prefer-lowest, prefer-stable ]
2222
include:
23+
- laravel: 13.*
24+
testbench: 11.*
25+
carbon: ^3.8.4
2326
- laravel: 12.*
2427
testbench: 10.*
2528
carbon: ^3.8.4
@@ -33,6 +36,10 @@ jobs:
3336
testbench: 7.*
3437
carbon: ^2.63
3538
exclude:
39+
- laravel: 13.*
40+
php: 8.2
41+
- laravel: 13.*
42+
php: 8.1
3643
- laravel: 12.*
3744
php: 8.1
3845
- laravel: 11.*
@@ -66,7 +73,7 @@ jobs:
6673
with:
6774
php-version: ${{ matrix.php }}
6875
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
69-
coverage: ${{ startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.3' && matrix.laravel == '11.*' && matrix.stability == 'prefer-stable' && 'xdebug' || 'none' }}
76+
coverage: ${{ startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable' && 'xdebug' || 'none' }}
7077

7178
- name: Install dependencies
7279
run: |
@@ -75,14 +82,14 @@ jobs:
7582
7683
- name: Execute tests
7784
run: |
78-
vendor/bin/phpunit ${{ startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.3' && matrix.laravel == '11.*' && matrix.stability == 'prefer-stable' && '--coverage-clover=clover.xml' || '' }}
85+
vendor/bin/phpunit ${{ startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable' && '--coverage-clover=clover.xml' || '' }}
7986
env:
8087
DB_USERNAME: user
8188
DB_PASSWORD: secret
8289
DB_PORT: ${{ job.services.mysql.ports[3306] }}
8390

8491
- name: Make code coverage badge
85-
if: startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.3' && matrix.laravel == '11.*' && matrix.stability == 'prefer-stable'
92+
if: startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable'
8693
uses: timkrase/phpunit-coverage-badge@v1.2.1
8794
with:
8895
coverage_badge_path: .github/coverage.svg

composer.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"illuminate/support": "^9.0 || ^10.0 || ^11.0 || ^12.0",
20+
"illuminate/support": "^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
2121
"maatwebsite/excel": "^3.1",
22-
"javaabu/forms": "^1.35",
23-
"javaabu/settings": "^1.6",
24-
"javaabu/generator-helpers": "^1.1"
22+
"javaabu/forms": "^1.67",
23+
"javaabu/settings": "^1.7",
24+
"javaabu/generator-helpers": "^1.3"
2525
},
2626
"require-dev": {
2727
"laravel/pint": "^1.14",
28-
"orchestra/testbench": "^7.0 || ^8.0 || ^9.2 || ^10.0",
29-
"phpunit/phpunit": "^9.5 || ^10.5 || ^11.5.3",
28+
"orchestra/testbench": "^7.0 || ^8.0 || ^9.2 || ^10.0 || ^11.0",
29+
"phpunit/phpunit": "^9.5 || ^10.5 || ^11.5.3 || ^12.5.8 || ^13.0.3",
3030
"spatie/laravel-activitylog": "^4.8",
3131
"plannr/laravel-fast-refresh-database": "^1.2"
3232
},
@@ -53,6 +53,17 @@
5353
]
5454
}
5555
},
56+
"repositories": [
57+
{
58+
"type": "vcs",
59+
"url": "https://github.com/Javaabu/Laravel-Excel.git",
60+
"canonical": false
61+
},
62+
{
63+
"type": "vcs",
64+
"url": "https://github.com/javaabu/laravel-settings.git"
65+
}
66+
],
5667
"minimum-stability": "dev",
5768
"prefer-stable": true
5869
}

tests/Feature/Commands/GenerateTimeSeriesStatCommandTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ protected function tearDown(): void
3434
parent::tearDown();
3535
}
3636

37-
/** @test */
38-
public function it_can_generate_a_new_sum_stat_file(): void
37+
public function test_it_can_generate_a_new_sum_stat_file(): void
3938
{
4039
$expected_path = $this->app->path('Stats/TimeSeries/PaymentsSum.php');
4140
$expected_content = $this->getTestStubContents('Stats/TimeSeries/PaymentsSum.php');
@@ -49,8 +48,7 @@ public function it_can_generate_a_new_sum_stat_file(): void
4948
$this->assertEquals($expected_content, $actual_content);
5049
}
5150

52-
/** @test */
53-
public function it_can_generate_a_new_count_stat_file(): void
51+
public function test_it_can_generate_a_new_count_stat_file(): void
5452
{
5553
$expected_path = $this->app->path('Stats/TimeSeries/PaymentsCount.php');
5654
$expected_content = $this->getTestStubContents('Stats/TimeSeries/PaymentsCount.php');
@@ -64,8 +62,7 @@ public function it_can_generate_a_new_count_stat_file(): void
6462
$this->assertEquals($expected_content, $actual_content);
6563
}
6664

67-
/** @test */
68-
public function it_registers_stats_maps(): void
65+
public function test_it_registers_stats_maps(): void
6966
{
7067
$expected_path = $this->app->path('Stats/TimeSeries/PaymentsCount.php');
7168
$expected_content = $this->getTestStubContents('Stats/TimeSeries/PaymentsCount.php');

tests/Feature/Controllers/TimeSeriesStatsApiControllerTest.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public function setUp(): void
2626
Activity::query()->delete();
2727
}
2828

29-
/** @test */
30-
public function it_can_generate_time_series_stats_with_filters(): void
29+
public function test_it_can_generate_time_series_stats_with_filters(): void
3130
{
3231
$this->travelTo('2024-07-04');
3332

@@ -120,8 +119,7 @@ public function it_can_generate_time_series_stats_with_filters(): void
120119
]);
121120
}
122121

123-
/** @test */
124-
public function it_can_generate_time_series_stats_from_api_with_preset_date_range(): void
122+
public function test_it_can_generate_time_series_stats_from_api_with_preset_date_range(): void
125123
{
126124
$this->travelTo('2024-07-04');
127125

@@ -224,8 +222,7 @@ public function it_can_generate_time_series_stats_from_api_with_preset_date_rang
224222
]);
225223
}
226224

227-
/** @test */
228-
public function it_can_generate_time_series_stats_from_api_with_custom_date_range(): void
225+
public function test_it_can_generate_time_series_stats_from_api_with_custom_date_range(): void
229226
{
230227
$this->travelTo('2024-07-04');
231228

@@ -320,8 +317,7 @@ public function it_can_generate_time_series_stats_from_api_with_custom_date_rang
320317
]);
321318
}
322319

323-
/** @test */
324-
public function it_can_generate_time_series_stats_from_api_with_preset_previous_date_range(): void
320+
public function test_it_can_generate_time_series_stats_from_api_with_preset_previous_date_range(): void
325321
{
326322
$this->travelTo('2024-07-04');
327323

@@ -427,8 +423,7 @@ public function it_can_generate_time_series_stats_from_api_with_preset_previous_
427423
]);
428424
}
429425

430-
/** @test */
431-
public function it_can_generate_time_series_stats_from_api_with_custom_previous_date_range(): void
426+
public function test_it_can_generate_time_series_stats_from_api_with_custom_previous_date_range(): void
432427
{
433428
$this->travelTo('2024-07-04');
434429

tests/Feature/Controllers/TimeSeriesStatsControllerTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public function setUp(): void
3131
Activity::query()->delete();
3232
}
3333

34-
/** @test */
35-
public function it_can_display_the_time_series_stats_generation_form(): void
34+
public function test_it_can_display_the_time_series_stats_generation_form(): void
3635
{
3736
$this->withoutExceptionHandling();
3837

@@ -73,8 +72,7 @@ public function it_can_display_the_time_series_stats_generation_form(): void
7372
->assertSee('name="metric"', false);
7473
}
7574

76-
/** @test */
77-
public function it_can_export_time_series_stats_with_preset_date_range(): void
75+
public function test_it_can_export_time_series_stats_with_preset_date_range(): void
7876
{
7977
$this->withoutExceptionHandling();
8078

tests/Feature/Formatters/ChartjsStatsFormatterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class ChartjsStatsFormatterTest extends TestCase
1414
{
1515
use MySQLRefreshDatabase;
1616

17-
/** @test */
18-
public function it_can_format_with_the_chartjs_formatter(): void
17+
public function test_it_can_format_with_the_chartjs_formatter(): void
1918
{
2019
$this->travelTo('2024-07-04');
2120

@@ -85,8 +84,7 @@ public function it_can_format_with_the_chartjs_formatter(): void
8584
], $compare_data);
8685
}
8786

88-
/** @test */
89-
public function it_can_format_with_the_chartjs_formatter_for_weekly_stats(): void
87+
public function test_it_can_format_with_the_chartjs_formatter_for_weekly_stats(): void
9088
{
9189
$this->travelTo('2024-07-22');
9290

tests/Feature/Formatters/CombinedStatsFormatterTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class CombinedStatsFormatterTest extends TestCase
1414
{
1515
use RefreshDatabase;
1616

17-
/** @test */
18-
public function it_can_format_with_the_combined_formatter(): void
17+
public function test_it_can_format_with_the_combined_formatter(): void
1918
{
2019
$this->travelTo('2024-07-04');
2120

tests/Feature/Formatters/DefaultStatsFormatterTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class DefaultStatsFormatterTest extends TestCase
1414
{
1515
use RefreshDatabase;
1616

17-
/** @test */
18-
public function it_can_format_with_the_default_formatter(): void
17+
public function test_it_can_format_with_the_default_formatter(): void
1918
{
2019
$this->travelTo('2024-07-04');
2120

tests/Feature/Formatters/FlotStatsFormatterTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class FlotStatsFormatterTest extends TestCase
1414
{
1515
use RefreshDatabase;
1616

17-
/** @test */
18-
public function it_can_format_with_the_flot_formatter(): void
17+
public function test_it_can_format_with_the_flot_formatter(): void
1918
{
2019
$this->travelTo('2024-07-04');
2120

tests/Feature/Formatters/SparklineChartsStatsFormatterTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class SparklineChartsStatsFormatterTest extends TestCase
1515
{
1616
use RefreshDatabase;
1717

18-
/** @test */
19-
public function it_can_format_with_the_sparkline_formatter(): void
18+
public function test_it_can_format_with_the_sparkline_formatter(): void
2019
{
2120
$this->travelTo('2024-07-04');
2221

0 commit comments

Comments
 (0)