Skip to content

Commit

Permalink
Support Laravel 11 (#84)
Browse files Browse the repository at this point in the history
* fix: annotate mock type

* chore: support laravel 11

* chore: run ci tests for laravel 11

* feat: Support different database testing traits across Laravel versions

* fix: testbench version configs

* feat: remove unnecessary traits
  • Loading branch information
FarhanShares authored Apr 15, 2024
1 parent e0519ab commit d85eaeb
Show file tree
Hide file tree
Showing 9 changed files with 1,296 additions and 1,062 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ jobs:
fail-fast: false
matrix:
php: [7.3, 7.4, 8.0, 8.1, 8.2]
laravel: [7.*, 8.*, 9.*, 10.*]
laravel: [7.*, 8.*, 9.*, 10.*, 11.*]
dependency-versions: [prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
Expand All @@ -30,26 +32,34 @@ jobs:

- php: 8.1
laravel: 7.*
- php: 8.1
laravel: 11.*

- php: 8.0
laravel: 10.*
- php: 8.0
laravel: 11.*

- php: 7.4
laravel: 9.*
- php: 7.4
laravel: 10.*
- php: 7.4
laravel: 11.*

- php: 7.3
laravel: 9.*
- php: 7.3
laravel: 10.*
- php: 7.3
laravel: 11.*


name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} / ${{ matrix.dependency-versions }}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
Expand All @@ -64,7 +74,7 @@ jobs:
id: composer_cache

- name: Cache composer dependencies
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
path: ${{ steps.composer_cache.outputs.COMPOSER_CACHE_DIR }}
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.vscode
/vendor
.DS_Store
.phpunit.cache
.phpunit.result.cache
phpunit.xml
yarn.lock
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ There are a few key concepts that need to be understood before continuing:

## Requirements

- PHP v7.3 | v7.4 | v8.0 | v8.1
- Laravel v7 | v8 | v9 | v10
- PHP v7.3 | v7.4 | v8.0 | v8.1 | v8.2
- Laravel v7 | v8 | v9 | v10 | v11
- Composer v1 | v2

## Installation
Expand Down Expand Up @@ -208,7 +208,7 @@ An instance of Media has the following attributes:
'mime_type' => string
'size' => int // in bytes
'friendly_size' => string // in human readable format
'media_uri' => string // media URI for the original file. Usage in Blade: {{ asset($media->media_url) }}.
'media_uri' => string // media URI for the original file. Usage in Blade: {{ asset($media->media_uri) }}.
'media_url' => string // direct URL for the original file.
'disk' => string
'data' => array // casts as array
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
],
"require": {
"php": "^8.0|^7.3",
"illuminate/support": "^7.0|^8.0|^9.0|^10.0",
"illuminate/database": "^7.0|^8.0|^9.0|^10.0",
"illuminate/validation": "^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^7.0|^8.0|^9.0|^10.0|^11.0",
"illuminate/database": "^7.0|^8.0|^9.0|^10.0|^11.0",
"illuminate/validation": "^7.0|^8.0|^9.0|^10.0|^11.0",
"intervention/image": "^2.5"
},
"require-dev": {
"laravel/framework": "^7.0|^8.0|^9.0|^10.0",
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
"laravel/framework": "^7.0|^8.0|^9.0|^10.0|^10.0",
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0||^9.0",
"mockery/mockery": "^1.2.3",
"laravel/legacy-factories": "^1.3.9"
},
Expand Down
Loading

0 comments on commit d85eaeb

Please sign in to comment.