Skip to content

Commit e997cb9

Browse files
authoredApr 11, 2024
Laravel 11.x Compatibility (#22)
1 parent 5471b2b commit e997cb9

File tree

6 files changed

+36
-57
lines changed

6 files changed

+36
-57
lines changed
 

‎.github/workflows/run-tests.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
1616
php: [8.3, 8.2, 8.1, 8.0]
17-
laravel: [10.*, 9.*]
17+
laravel: [11.*, 10.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
20+
- laravel: 11.*
21+
testbench: 9.*
22+
carbon: ^3.0
2023
- laravel: 10.*
2124
testbench: 8.*
22-
carbon: ^2.63
23-
- laravel: 9.*
24-
testbench: 7.*
25-
carbon: ^2.63
25+
carbon: ^2.67
2626
exclude:
2727
- laravel: 10.*
2828
php: 8.0
29+
- laravel: 11.*
30+
php: 8.1
31+
- laravel: 11.*
32+
php: 8.0
2933

3034

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

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ testbench.yaml
1212
vendor
1313
node_modules
1414
.php-cs-fixer.cache
15+
.phpunit.cache
16+
.phpunit.cache/test-results

‎LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2023 MAIZE SRL <info@maize.io>
3+
Copyright (c) 2024 MAIZE SRL <info@maize.io>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎composer.json

+9-11
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,20 @@
1717
],
1818
"require": {
1919
"php": "^8.0",
20-
"illuminate/database": "^9.0|^10.0",
21-
"illuminate/support": "^9.0|^10.0",
20+
"illuminate/database": "^10.0|^11.0",
21+
"illuminate/support": "^10.0|^11.0",
2222
"spatie/laravel-package-tools": "^1.14.1"
2323
},
2424
"require-dev": {
2525
"friendsofphp/php-cs-fixer": "^3.7",
26-
"nunomaduro/collision": "^6.0",
27-
"nunomaduro/larastan": "^2.0.1",
28-
"orchestra/testbench": "^7.0|^8.0",
29-
"pestphp/pest": "^1.21",
30-
"pestphp/pest-plugin-laravel": "^1.1",
31-
"pestphp/pest-plugin-mock": "^1.0",
32-
"phpstan/extension-installer": "^1.1",
26+
"larastan/larastan": "^2.0.1",
27+
"nunomaduro/collision": "^7.10.0|^8.1.1",
28+
"orchestra/testbench": "^8.0|^9.0",
29+
"pestphp/pest": "^2.34",
30+
"pestphp/pest-plugin-laravel": "^2.3",
31+
"phpstan/extension-installer": "^1.3",
3332
"phpstan/phpstan-deprecation-rules": "^1.0",
34-
"phpstan/phpstan-phpunit": "^1.0",
35-
"phpunit/phpunit": "^9.5"
33+
"phpstan/phpstan-phpunit": "^1.0"
3634
},
3735
"autoload": {
3836
"psr-4": {

‎phpunit.xml.dist

+14-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
bootstrap="vendor/autoload.php"
8-
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnFailure="false"
14-
executionOrder="random"
15-
failOnWarning="true"
16-
failOnRisky="true"
17-
failOnEmptyTestSuite="true"
18-
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
20-
>
21-
<testsuites>
22-
<testsuite name="Maize Test Suite">
23-
<directory>tests</directory>
24-
</testsuite>
25-
</testsuites>
26-
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</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>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<testsuites>
4+
<testsuite name="Maize Test Suite">
5+
<directory>tests</directory>
6+
</testsuite>
7+
</testsuites>
8+
<logging>
9+
<junit outputFile="build/report.junit.xml"/>
10+
</logging>
11+
<source>
12+
<include>
13+
<directory suffix=".php">./src</directory>
14+
</include>
15+
</source>
3916
</phpunit>

‎tests/HelpersTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
use Maize\Helpers\Tests\Support\Models\Article;
88
use Maize\Helpers\Tests\Support\Models\Post;
99

10-
use function PHPUnit\Framework\assertNotEquals;
11-
1210
beforeEach(function () {
1311
Relation::morphMap(['article' => Article::class]);
1412
});
@@ -24,7 +22,7 @@
2422
}
2523

2624
$expect->toEndWith($ext);
27-
assertNotEquals($expect, $filename);
25+
$this->assertNotEquals($expect, $filename);
2826
})->with([
2927
['filename' => '', 'ext' => ''],
3028
['name' => 'test', 'ext' => '.zip'],

0 commit comments

Comments
 (0)