Skip to content

Commit

Permalink
feat: add Laravel 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
seancheung committed Mar 27, 2023
1 parent 07e18d0 commit eb380fe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 36 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
laravel-versions: ["^6.0", "^7.0", "^8.0", "^9.0"]
php-versions: ["7.2", "7.3", "7.4", "8.0"]
laravel-versions: ["^6.0", "^7.0", "^8.0", "^9.0", "^10.0"]
php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1"]
exclude:
- laravel-versions: "^6.0"
php-versions: "8.1"
- laravel-versions: "^7.0"
php-versions: "8.1"
- laravel-versions: "^8.0"
php-versions: "7.2"
- laravel-versions: "^9.0"
Expand All @@ -22,10 +26,18 @@ jobs:
php-versions: "7.3"
- laravel-versions: "^9.0"
php-versions: "7.4"
- laravel-versions: "^10.0"
php-versions: "7.2"
- laravel-versions: "^10.0"
php-versions: "7.3"
- laravel-versions: "^10.0"
php-versions: "7.4"
- laravel-versions: "^10.0"
php-versions: "8.0"
name: PHP ${{ matrix.php-versions }} with Laravel ${{ matrix.laravel-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<p align="center">
<a href="https://github.com/seancheung/history/actions"><img src="https://github.com/seancheung/history/workflows/Test/badge.svg" alt="Test Status"></a>
<a href="https://travis-ci.org/seancheung/history"><img src="https://travis-ci.org/seancheung/history.svg?branch=master" alt="Test Status"></a>
<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>
<a href="https://packagist.org/packages/panoscape/history"><img src="https://poser.pugx.org/panoscape/history/downloads" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/panoscape/history"><img src="https://poser.pugx.org/panoscape/history/v" alt="Latest Stable Version"></a>
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"keywords": ["laravel", "log", "history", "tracking", "eloquent", "model"],
"homepage": "https://github.com/seancheung/history",
"require": {
"php": "^7.2|^7.2.5|^7.3|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0"
"php": "^7.2|^7.2.5|^7.3|^8.0|^8.1",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0"
},
"license": "MIT",
"authors": [
Expand All @@ -31,7 +31,7 @@
},
"require-dev": {
"phpunit/phpunit": "^8.3|^8.4|^9.0",
"orchestra/testbench": "^4.8|^5.2|^6.2|^7.5",
"orchestra/testbench": "^4.8|^5.2|^6.2|^7.5|^8.0",
"mockery/mockery": "^1.2",
"php-coveralls/php-coveralls": "^2.1"
},
Expand Down
10 changes: 2 additions & 8 deletions src/History.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,14 @@ class History extends Model
*/
public $timestamps = false;

/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['performed_at'];

/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'meta' => 'array'
'meta' => 'array',
'performed_at' => 'datetime'
];

/**
Expand Down

0 comments on commit eb380fe

Please sign in to comment.