Skip to content

Commit

Permalink
Laravel 10 support (#32)
Browse files Browse the repository at this point in the history
* Locked PHP versions to 8.1 and 8.2
* Added Laravel 10 support
* Dropped Laravel 8 support
  • Loading branch information
Okipa authored Jan 22, 2023
1 parent 160f5eb commit 21b959b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ['8.2', '8.1']
laravel: ['9.*']
php: ['8.1', '8.2']
laravel: ['9.*', '10.*']
include:
- laravel: '9.*'
testbench: '7.*'
- laravel: '10.*'
testbench: '8.*'

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

Expand Down Expand Up @@ -47,26 +49,26 @@ jobs:
# Lower PHP and laravel versions.

- name: PHPUnit without code coverage
if: matrix.php != '8.2' || matrix.laravel != '9.*'
if: matrix.php != '8.2' || matrix.laravel != '10.*'
run: vendor/bin/testbench package:test --parallel --no-coverage

# Last PHP and laravel versions.

- name: Code analysis
if: matrix.php == '8.2' && matrix.laravel == '9.*'
if: matrix.php == '8.2' && matrix.laravel == '10.*'
run: |
vendor/bin/pint --test -vvv
vendor/bin/phpmd src,tests text phpmd.xml
vendor/bin/phpstan analyse
- name: PHPUnit with code coverage
if: matrix.php == '8.2' && matrix.laravel == '9.*'
if: matrix.php == '8.2' && matrix.laravel == '10.*'
run: |
mkdir -p build/logs
vendor/bin/testbench package:test --parallel --coverage-text --coverage-clover build/logs/clover.xml
- name: Code coverage upload to Coveralls
if: env.COVERALLS_REPO_TOKEN && matrix.php == '8.2' && matrix.laravel == '9.*'
if: env.COVERALLS_REPO_TOKEN && matrix.php == '8.2' && matrix.laravel == '10.*'
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [10.2.0](https://github.com/Okipa/laravel-medialibrary-ext/compare/10.1.0...10.2.0)

2023-01-21

* Locked PHP versions to 8.1 and 8.2
* Added Laravel 10 support
* Dropped Laravel 8 support

## [10.1.0](https://github.com/Okipa/laravel-medialibrary-ext/compare/10.0.2...10.1.0)

2022-12-16
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@ Found this package helpful? Please consider supporting my work!

## Compatibility

This package extension will follow the [base package](https://github.com/spatie/laravel-medialibrary) major versions and compatibility constraints.
This package extension will follow the [base package](https://github.com/spatie/laravel-medialibrary) major versions but may be a bit stricter about compatibility constraints.

| Laravel | Original package | PHP | Package |
|------------------------------------------------------|------------------|--------------------|---------|
| ^9.0 | ^10.0 | ^10.0 | 8.1.* | 8.2.* | ^10.2 |
| ^9.0 | ^10.0 | ^8.1 | ^8.2 | ^10.1 |
| ^9.0 | ^10.0 | ^8.0 | ^8.1 | ^10.0 |
| ^7.0 | ^8.0 | ^9.0 | ^7.4 | ^8.0 | ^9.1 |
| ^7.0 | ^8.0 | ^9.0 | ^7.4 | ^9.0 |
| ^7.0 | ^8.0 | ^8.0 | ^7.4 | ^8.1 |
| ^6.0 | ^7.0 | ^8.0 | ^7.4 | ^8.0 |
| ^6.0 | ^7.0 | X | ^7.4 | ^8.0 |
| ^5.8 | ^6.0 | ^7.0 | X | ^7.2 | ^7.18 |
| ^5.5 | ^5.6 | ^5.7 | ^5.8 | ^6.0 | X | ^7.2 | ^7.12 |
| ^5.5 | ^5.6 | ^5.7 | ^5.8 | X | ^7.2 | ^7.11 |

## Upgrade guide

Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@
}
],
"require": {
"php": "^8.1|^8.2",
"illuminate/contracts": "^9.0",
"php": "8.1.*|8.2.*",
"illuminate/contracts": "^9.0|^10.0",
"spatie/laravel-medialibrary": "^10.0",
"symfony/mime": "^6.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"brianium/paratest": "^6.4",
"nunomaduro/collision": "^6.0",
"nunomaduro/larastan": "^1.0",
"orchestra/testbench": "^7.0",
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^7.0|^8.0",
"phpmd/phpmd": "^2.11",
"laravel/pint": "^1.1"
},
Expand Down

0 comments on commit 21b959b

Please sign in to comment.