diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 0325394..e2daae2 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -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" @@ -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: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5b30598..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php -php: - - "7.4" - - "7.3" - - "7.2" -env: - - TESTBENCH_VERSION=^6.2 - - TESTBENCH_VERSION=^5.2 - - TESTBENCH_VERSION=^4.8 -jobs: - exclude: - - php: "7.2" - env: TESTBENCH_VERSION=^6.2 -before_install: - - composer require --dev "orchestra/testbench:${TESTBENCH_VERSION}" -install: - - composer install -n -script: - - composer test:dist -after_success: - - travis_retry composer test:coverage diff --git a/README.md b/README.md index 0da7c3f..6b5f211 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@

Test Status -Test Status Coverage Status Total Downloads Latest Stable Version diff --git a/composer.json b/composer.json index 3bc44e0..3991ad1 100644 --- a/composer.json +++ b/composer.json @@ -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": [ @@ -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" }, diff --git a/src/History.php b/src/History.php index 271ee9a..fe95790 100644 --- a/src/History.php +++ b/src/History.php @@ -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' ]; /**