Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Laravel 11 #5

Merged
merged 10 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
name: run-tests

on:
push:
branches: [master]
pull_request:
branches: [master]
on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.0.2, 8.1]
laravel: [9.*]
stability: [prefer-lowest, prefer-stable]
php: [8.3, 8.2]
laravel: ["^11.0", "^10.0"]
include:
- laravel: 9.*
testbench: ^7.0
- laravel: "^11.0"
testbench: 9.*
- laravel: "^10.0"
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Setup problem matchers
Expand All @@ -40,6 +36,6 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer update --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
}
],
"require": {
"php": "^8.0.2",
"php": "^8.2",
"firebase/php-jwt": "^6.4",
"illuminate/auth": "^9.0|^10.0",
"illuminate/http": "^9.0|^10.0",
"illuminate/contracts": "^9.0|^10.0",
"illuminate/routing": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0"
"illuminate/auth": "^10.0|^11.0",
"illuminate/http": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/routing": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "^7.0",
"pestphp/pest": "^1.12"
"orchestra/testbench": "^8.0|^9.0",
"pestphp/pest": "^2.0"
},
"autoload": {
"psr-4": {
Expand All @@ -53,5 +53,7 @@
"DaniloPolani\\FusionAuthJwt\\FusionAuthJwtServiceProvider"
]
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
26 changes: 11 additions & 15 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
8 changes: 8 additions & 0 deletions src/FusionAuthJwtUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ public function getAuthPassword()
return '';
}

/**
* {@inheritDoc}
*/
public function getAuthPasswordName()
{
return '';
}

/**
* {@inheritDoc}
*/
Expand Down
8 changes: 8 additions & 0 deletions src/FusionAuthJwtUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@ public function validateCredentials(Authenticatable $user, array $credentials)
{
return false;
}

/**
* {@inheritDoc}
*/
public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false)
{
return;
}
}