Skip to content

Commit 08909f8

Browse files
willpower232MortenDHansenerikn69
committed
🔧 drop php < 8.2 and add laravel 12
Co-authored-by: Morten D. Hansen <[email protected]> Co-authored-by: erikn69 <[email protected]>
1 parent 2c2b9c7 commit 08909f8

25 files changed

+245
-293
lines changed

‎.github/workflows/run-tests.yml

+7-44
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,26 @@ name: run-tests
22

33
on:
44
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
5+
branches:
6+
- '*'
87

98
jobs:
109
run-tests:
1110
runs-on: ubuntu-latest
1211
strategy:
1312
fail-fast: false
1413
matrix:
15-
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
16-
laravel: [ 11.*, 10.*, 9.*, 8.*, 7.* ]
14+
php: [ 8.2, 8.3, 8.4 ]
15+
laravel: [ 11.*, 12.* ]
1716
include:
17+
- laravel: 12.*
18+
testbench: 10.*
1819
- laravel: 11.*
1920
testbench: 9.*
20-
- laravel: 10.*
21-
testbench: 8.*
22-
- laravel: 9.*
23-
testbench: 7.*
24-
- laravel: 8.*
25-
testbench: 6.*
26-
- laravel: 7.*
27-
testbench: 5.*
28-
exclude:
29-
- laravel: 11.*
30-
php: 8.1
31-
- laravel: 11.*
32-
php: 8.0
33-
- laravel: 11.*
34-
php: 7.4
35-
- laravel: 10.*
36-
php: 7.4
37-
- laravel: 10.*
38-
php: 8.0
39-
- laravel: 9.*
40-
php: 7.4
41-
- laravel: 9.*
42-
php: 8.4
43-
- laravel: 8.*
44-
php: 8.3
45-
- laravel: 8.*
46-
php: 8.4
47-
- laravel: 7.*
48-
php: 8.1
49-
- laravel: 7.*
50-
php: 8.2
51-
- laravel: 7.*
52-
php: 8.3
53-
- laravel: 7.*
54-
php: 8.4
5521

5622
name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.dependency-version }}
5723

5824
steps:
59-
- name: Update apt
60-
run: sudo apt-get update --fix-missing
61-
6225
- name: Checkout code
6326
uses: actions/checkout@v4
6427

@@ -78,4 +41,4 @@ jobs:
7841
- name: Execute tests
7942
run: |
8043
vendor/bin/phpunit
81-
vendor/bin/phpunit tests/Unit/AuditTest.php --group command-line-url-resolver
44+
vendor/bin/phpunit tests/Unit/AuditTest.php --group command-line-url-resolver

‎README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a href="https://discord.gg/csD9ysg"><img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Chat"></a>
1313
</p>
1414

15-
This package will help you understand changes in your Eloquent models, by providing information about possible discrepancies and anomalies that could indicate business concerns or suspect activities.
15+
This package will help you understand changes in your Eloquent models, by providing information about possible discrepancies and anomalies that could indicate business concerns or suspect activities.
1616

1717
Laravel Auditing allows you to keep a history of model changes by simply using a trait. Retrieving the audited data is straightforward, making it possible to display it in various ways.
1818

@@ -26,7 +26,8 @@ Thank you for choosing OwenIt\LaravelAuditing!
2626

2727
Version | Illuminate | Status | PHP Version
2828
:----------|:---------------|:------------------------|:------------
29-
13.x | 7.x.x - 11.x.x | Active support :rocket: | > = 7.3 \| 8.0
29+
14.x | 11.x.x - 12.x.x | Active support :rocket: | > = 8.2
30+
13.x | 7.x.x - 11.x.x | End of life | > = 7.3 \| 8.0
3031
12.x | 6.x.x - 9.x.x | End of life | > = 7.3 \| 8.0
3132
11.x | 5.8.x - 8.x.x | End of life | > = 7.3
3233
10.x | 5.8.x - 7.x.x | End of life | > = 7.2.5

‎composer.json

+11-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "owen-it/laravel-auditing",
3-
"description": "Audit changes of your Eloquent models in Laravel/Lumen",
3+
"description": "Audit changes of your Eloquent models in Laravel",
44
"keywords": [
55
"accountability",
66
"audit",
@@ -39,17 +39,16 @@
3939
}
4040
],
4141
"require": {
42-
"php": "^7.3|^8.0",
43-
"illuminate/console": "^7.0|^8.0|^9.0|^10.0|^11.0",
44-
"illuminate/database": "^7.0|^8.0|^9.0|^10.0|^11.0",
45-
"illuminate/filesystem": "^7.0|^8.0|^9.0|^10.0|^11.0",
46-
"ext-json": "*"
42+
"php": "^8.2",
43+
"ext-json": "*",
44+
"illuminate/console": "^11.0|^12.0",
45+
"illuminate/database": "^11.0|^12.0",
46+
"illuminate/filesystem": "^11.0|^12.0"
4747
},
4848
"require-dev": {
49-
"phpunit/phpunit": "^9.6|^10.5|^11.0",
50-
"mockery/mockery": "^1.0",
51-
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0|^9.0",
52-
"laravel/legacy-factories": "*"
49+
"mockery/mockery": "^1.5.1",
50+
"orchestra/testbench": "^9.0|^10.0",
51+
"phpunit/phpunit": "^11.0"
5352
},
5453
"autoload": {
5554
"psr-4": {
@@ -58,16 +57,11 @@
5857
},
5958
"autoload-dev": {
6059
"psr-4": {
61-
"OwenIt\\Auditing\\Tests\\": "tests/"
60+
"OwenIt\\Auditing\\Tests\\": "tests/",
61+
"Database\\Factories\\OwenIt\\Auditing\\Tests\\Models\\": "tests/database/factories"
6262
}
6363
},
64-
"suggest": {
65-
"irazasyed/larasupport": "Needed to publish the package configuration in Lumen"
66-
},
6764
"extra": {
68-
"branch-alias": {
69-
"dev-master": "v13-dev"
70-
},
7165
"laravel": {
7266
"providers": [
7367
"OwenIt\\Auditing\\AuditingServiceProvider"

‎database/migrations/audits.stub

+4-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
66

7-
class CreateAuditsTable extends Migration
7+
return new class extends Migration
88
{
99
/**
1010
* Run the migrations.
11-
*
12-
* @return void
1311
*/
14-
public function up()
12+
public function up(): void
1513
{
1614
$connection = config('audit.drivers.database.connection', config('database.default'));
1715
$table = config('audit.drivers.database.table', 'audits');
@@ -39,14 +37,12 @@ class CreateAuditsTable extends Migration
3937

4038
/**
4139
* Reverse the migrations.
42-
*
43-
* @return void
4440
*/
45-
public function down()
41+
public function down(): void
4642
{
4743
$connection = config('audit.drivers.database.connection', config('database.default'));
4844
$table = config('audit.drivers.database.table', 'audits');
4945

5046
Schema::connection($connection)->drop($table);
5147
}
52-
}
48+
};

‎phpunit.xml

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
44
backupGlobals="false"
5-
backupStaticAttributes="false"
65
bootstrap="vendor/autoload.php"
76
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
117
processIsolation="false"
128
stopOnError="false"
139
stopOnFailure="true"
14-
verbose="true"
10+
cacheDirectory=".phpunit.cache"
11+
backupStaticProperties="false"
1512
>
1613
<testsuites>
1714
<testsuite name="Auditing Test Suite">
18-
<directory suffix="Test.php">./tests</directory>
15+
<directory>./tests</directory>
1916
</testsuite>
2017
</testsuites>
2118
<groups>
@@ -27,9 +24,9 @@
2724
<group>command-line-url-resolver</group>
2825
</exclude>
2926
</groups>
30-
<coverage processUncoveredFiles="true">
27+
<source>
3128
<include>
3229
<directory suffix=".php">./src</directory>
3330
</include>
34-
</coverage>
31+
</source>
3532
</phpunit>

‎tests/AuditingTestCase.php

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public function setUp(): void
5454
parent::setUp();
5555

5656
$this->loadMigrationsFrom(__DIR__ . '/database/migrations');
57-
$this->withFactories(__DIR__ . '/database/factories');
5857
}
5958

6059
/**

0 commit comments

Comments
 (0)