Skip to content

Commit eb380fe

Browse files
committed
feat: add Laravel 10 support
1 parent 07e18d0 commit eb380fe

File tree

5 files changed

+20
-36
lines changed

5 files changed

+20
-36
lines changed

.github/workflows/laravel.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
laravel-versions: ["^6.0", "^7.0", "^8.0", "^9.0"]
15-
php-versions: ["7.2", "7.3", "7.4", "8.0"]
14+
laravel-versions: ["^6.0", "^7.0", "^8.0", "^9.0", "^10.0"]
15+
php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1"]
1616
exclude:
17+
- laravel-versions: "^6.0"
18+
php-versions: "8.1"
19+
- laravel-versions: "^7.0"
20+
php-versions: "8.1"
1721
- laravel-versions: "^8.0"
1822
php-versions: "7.2"
1923
- laravel-versions: "^9.0"
@@ -22,10 +26,18 @@ jobs:
2226
php-versions: "7.3"
2327
- laravel-versions: "^9.0"
2428
php-versions: "7.4"
29+
- laravel-versions: "^10.0"
30+
php-versions: "7.2"
31+
- laravel-versions: "^10.0"
32+
php-versions: "7.3"
33+
- laravel-versions: "^10.0"
34+
php-versions: "7.4"
35+
- laravel-versions: "^10.0"
36+
php-versions: "8.0"
2537
name: PHP ${{ matrix.php-versions }} with Laravel ${{ matrix.laravel-versions }}
2638
steps:
2739
- name: Checkout
28-
uses: actions/checkout@v2
40+
uses: actions/checkout@v3
2941
- name: Setup PHP
3042
uses: shivammathur/setup-php@v2
3143
with:

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<p align="center">
22
<a href="https://github.com/seancheung/history/actions"><img src="https://github.com/seancheung/history/workflows/Test/badge.svg" alt="Test Status"></a>
3-
<a href="https://travis-ci.org/seancheung/history"><img src="https://travis-ci.org/seancheung/history.svg?branch=master" alt="Test Status"></a>
43
<a href='https://coveralls.io/github/seancheung/history?branch=master'><img src='https://coveralls.io/repos/github/seancheung/history/badge.svg?branch=master' alt='Coverage Status' /></a>
54
<a href="https://packagist.org/packages/panoscape/history"><img src="https://poser.pugx.org/panoscape/history/downloads" alt="Total Downloads"></a>
65
<a href="https://packagist.org/packages/panoscape/history"><img src="https://poser.pugx.org/panoscape/history/v" alt="Latest Stable Version"></a>

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"keywords": ["laravel", "log", "history", "tracking", "eloquent", "model"],
55
"homepage": "https://github.com/seancheung/history",
66
"require": {
7-
"php": "^7.2|^7.2.5|^7.3|^8.0",
8-
"illuminate/support": "^6.0|^7.0|^8.0|^9.0"
7+
"php": "^7.2|^7.2.5|^7.3|^8.0|^8.1",
8+
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0"
99
},
1010
"license": "MIT",
1111
"authors": [
@@ -31,7 +31,7 @@
3131
},
3232
"require-dev": {
3333
"phpunit/phpunit": "^8.3|^8.4|^9.0",
34-
"orchestra/testbench": "^4.8|^5.2|^6.2|^7.5",
34+
"orchestra/testbench": "^4.8|^5.2|^6.2|^7.5|^8.0",
3535
"mockery/mockery": "^1.2",
3636
"php-coveralls/php-coveralls": "^2.1"
3737
},

src/History.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@ class History extends Model
1313
*/
1414
public $timestamps = false;
1515

16-
/**
17-
* The attributes that should be mutated to dates.
18-
*
19-
* @var array
20-
*/
21-
protected $dates = ['performed_at'];
22-
2316
/**
2417
* The attributes that should be cast to native types.
2518
*
2619
* @var array
2720
*/
2821
protected $casts = [
29-
'meta' => 'array'
22+
'meta' => 'array',
23+
'performed_at' => 'datetime'
3024
];
3125

3226
/**

0 commit comments

Comments
 (0)