Skip to content

Commit

Permalink
feat: add Laravel 11 support (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Mar 15, 2024
1 parent c222c50 commit f876297
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- next-major
- beta
- alpha
- '[0-9]+.x'
pull_request:
types: [opened, synchronize, reopened]
release:
Expand All @@ -17,8 +16,8 @@ on:
workflow_dispatch:

env:
default-php-version: '8.2'
default-laravel-version: '10.*'
default-php-version: '8.3'
default-laravel-version: '11.0'
semantic-node-version: 20

concurrency:
Expand All @@ -34,21 +33,36 @@ jobs:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']
laravel-version: ['9.*', '10.*']
laravel-version: ['9.0', '10.0', '11.0']
psr7: ['guzzle']
include:
- php-version: '8.1'
laravel-version: '9.*'
laravel-version: '9.0'
psr7: 'nyholm'
- php-version: '8.1'
laravel-version: '9.*'
laravel-version: '9.0'
psr7: 'discovery'
- php-version: '8.2'
laravel-version: '10.*'
laravel-version: '10.0'
psr7: 'nyholm'
- php-version: '8.2'
laravel-version: '10.*'
laravel-version: '10.0'
psr7: 'discovery'
- php-version: '8.2'
laravel-version: '11.0'
psr7: 'nyholm'
- php-version: '8.2'
laravel-version: '11.0'
psr7: 'discovery'
- php-version: '8.3'
laravel-version: '11.0'
psr7: 'nyholm'
- php-version: '8.3'
laravel-version: '11.0'
psr7: 'discovery'
exclude:
- php-version: '8.1'
laravel-version: '11.0'

steps:
- name: Checkout sources
Expand Down Expand Up @@ -90,7 +104,7 @@ jobs:
- name: Update dependencies with Laravel ${{ matrix.laravel-version }}
run: |
export COMPOSER_ROOT_VERSION=dev-main
composer require "illuminate/support:${{ matrix.laravel-version }}" --no-update
composer require "illuminate/support:^${{ matrix.laravel-version }}" --no-update
- name: Use psr7 variant (nyholm)
if: matrix.psr7 == 'nyholm'
Expand Down Expand Up @@ -149,7 +163,7 @@ jobs:
- name: Download results
uses: actions/download-artifact@v4
with:
pattern: ${{ format('results_{0}_{1}', env.default-php-version, env.default-laravel-version) }}
pattern: ${{ format('results_{0}_{1}*', env.default-php-version, env.default-laravel-version) }}
path: results
merge-multiple: true

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"require": {
"php": ">=8.1",
"illuminate/support": "^9.0 || ^10.0",
"illuminate/support": "^9.0 || ^10.0 || ^11.0",
"phpdocumentor/reflection-docblock": "^5.3",
"psr/http-factory-implementation": "1.0",
"symfony/property-access": "^6.4 || ^7.0",
Expand All @@ -37,17 +37,17 @@
"require-dev": {
"ext-sqlite3": "*",
"guzzlehttp/psr7": "^2.1",
"jschaedl/composer-git-hooks": "^4.0",
"larastan/larastan": "^2.0",
"laravel/legacy-factories": "^1.0",
"laravel/pint": "^1.13",
"nunomaduro/larastan": "^2.0",
"ocramius/package-versions": "^2.0",
"orchestra/testbench": "^7.0 || ^8.0",
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.5 || ^10.0",
"psalm/plugin-laravel": "^2.8",
"xheaven/composer-git-hooks": "^3.1"
"phpunit/phpunit": "^9.5 || ^10.0 || ^11.0",
"psalm/plugin-laravel": "^2.8"
},
"suggest": {
"guzzlehttp/psr7": "To provide a psr/http-factory-implementation implementation",
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- ./vendor/nunomaduro/larastan/extension.neon
- ./vendor/larastan/larastan/extension.neon
- ./vendor/phpstan/phpstan-deprecation-rules/rules.neon
- ./vendor/phpstan/phpstan-strict-rules/rules.neon

Expand Down
2 changes: 1 addition & 1 deletion src/Models/WebauthnKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WebauthnKey extends Model
/**
* The attributes that are mass assignable.
*
* @var array<string>
* @var array<int,string>
*/
protected $fillable = [
'user_id',
Expand Down

0 comments on commit f876297

Please sign in to comment.