Skip to content

Commit

Permalink
Laravel 10.x Compatibility (#219)
Browse files Browse the repository at this point in the history
Co-authored-by: Loris Leiva <[email protected]>
  • Loading branch information
laravel-shift and lorisleiva authored Feb 5, 2023
1 parent 1d55ab1 commit 70f78fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,22 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
php: ["8.0", "8.1"]
laravel: ["^8.67", "^9.0"]
laravel: ["^8.67", "^9.0", "^10.0"]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: "^8.67"
testbench: "^6.23"
testbench-core: "^6.27"
- laravel: "^9.0"
testbench: "7.0"
testbench-core: "7.0"
testbench: "^7.0"
- laravel: "^10.0"
testbench: "^8.0"
exclude:
- php: "8.0"
laravel: "^8.67"
dependency-version: prefer-lowest
- php: "8.1"
laravel: "^8.67"
- laravel: "^8.67"
dependency-version: prefer-lowest
- php: "8.0"
laravel: "^10.0"

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

Expand All @@ -47,7 +45,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "orchestra/testbench-core:${{ matrix.testbench-core }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ⚡️ Laravel Actions

[![Latest Version on Packagist](https://img.shields.io/packagist/v/lorisleiva/laravel-actions.svg)](https://packagist.org/packages/lorisleiva/laravel-actions)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/lorisleiva/laravel-actions/Tests?label=tests)](https://github.com/lorisleiva/laravel-actions/actions?query=workflow%3ATests+branch%3Amain)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/lorisleiva/laravel-actions/run-tests.yml?branch=main)](https://github.com/lorisleiva/laravel-actions/actions?query=workflow%3ATests+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/lorisleiva/laravel-actions.svg)](https://packagist.org/packages/lorisleiva/laravel-actions)

![hero](https://user-images.githubusercontent.com/3642397/104024620-4e572400-51bb-11eb-97fc-c2692b16eaa7.png)
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
}
],
"require": {
"php": "^8.0",
"illuminate/contracts": "^8.15 || 9.0 - 9.34 || ^9.36",
"lorisleiva/lody": "^0.3.0"
"php": "^8.0|^8.1",
"illuminate/contracts": "^8.15 || 9.0 - 9.34 || ^9.36 || ^10.0",
"lorisleiva/lody": "^0.4.0"
},
"require-dev": {
"orchestra/testbench": "7.0.0",
"orchestra/testbench-core": "7.0.0",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^1.2",
"phpunit/phpunit": "^9.5"
},
Expand Down
4 changes: 2 additions & 2 deletions tests/AsJobSerializedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function handle()
->and($firstParameter['class'])->toBe(get_class($model))
->and($firstParameter['id'])->toBe($model->id)
->and($firstParameter['relations'])->toBe([])
->and($firstParameter['connection'])->toBe("sqlite");
->and($firstParameter['connection'])->toBeIn(["testing", "sqlite"]);
});

it('unserialises Eloquent models within the parameters', function () {
Expand Down Expand Up @@ -95,7 +95,7 @@ public function handle()
->and($firstParameter['class'])->toBe(get_class($modelA))
->and($firstParameter['id'])->toBe($collection->pluck('id')->toArray())
->and($firstParameter['relations'])->toBe([])
->and($firstParameter['connection'])->toBe("sqlite");
->and($firstParameter['connection'])->toBeIn(["testing", "sqlite"]);
});

it('unserialises Eloquent collections within the parameters', function () {
Expand Down

0 comments on commit 70f78fb

Please sign in to comment.