Skip to content

Commit

Permalink
Merge pull request #17 from worksome/feature/laravel-11
Browse files Browse the repository at this point in the history
feat: add support for Laravel 11
  • Loading branch information
owenvoke authored Mar 21, 2024
2 parents 6a213d3 + 6ac76d2 commit 56d757d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2]
laravel: ['10.*']
php: [8.2, 8.3]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/worksome/laravel-mfa/Static%20Analysis?style=flat-square&label=code%20style)](https://github.com/worksome/laravel-mfa/actions?query=workflow%3A"Static+Analysis"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/worksome/laravel-mfa.svg?style=flat-square)](https://packagist.org/packages/worksome/laravel-mfa)

A driver-based multifactor authentication package for Laravel
A driver-based multi-factor authentication package for Laravel

## Installation

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "worksome/laravel-mfa",
"description": "A driver-based multifactor authentication package for Laravel",
"description": "A driver-based multi-factor authentication package for Laravel",
"keywords": [
"worksome",
"laravel",
Expand All @@ -17,18 +17,18 @@
],
"require": {
"php": "^8.2",
"guzzlehttp/guzzle": "^7.5",
"laravel/framework": "^10.0",
"guzzlehttp/guzzle": "^7.8",
"laravel/framework": "^10.0 || ^11.0",
"pragmarx/google2fa": "^8.0",
"spatie/laravel-package-tools": "^1.14.1"
"spatie/laravel-package-tools": "^1.16"
},
"require-dev": {
"nunomaduro/collision": "^7.0",
"nunomaduro/larastan": "^2.4.0",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"worksome/coding-style": "^2.5"
"larastan/larastan": "^2.6",
"nunomaduro/collision": "^7.0 || ^8.1",
"orchestra/testbench": "^8.0 || ^9.0",
"pestphp/pest": "^2.33",
"pestphp/pest-plugin-laravel": "^2.2",
"worksome/coding-style": "^2.10"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 2 additions & 0 deletions src/Casts/ToFieldCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use InvalidArgumentException;
use Worksome\MultiFactorAuth\DataValues\Email\EmailAddress;
use Worksome\MultiFactorAuth\DataValues\Identifier;
use Worksome\MultiFactorAuth\DataValues\Sms\E164PhoneNumber;
use Worksome\MultiFactorAuth\DataValues\Totp\TotpSecret;
use Worksome\MultiFactorAuth\Enums\Channel;
use Worksome\MultiFactorAuth\Exceptions\InvalidValueException;
use Worksome\MultiFactorAuth\Models\MultiFactor;

/** @implements CastsAttributes<Identifier, Identifier> */
class ToFieldCaster implements CastsAttributes
{
/** @param MultiFactor $model */
Expand Down
2 changes: 1 addition & 1 deletion src/Models/MultiFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @property Carbon|null $verified_at
* @property Carbon $created_at
* @property Carbon $updated_at
* @property MultiFactorAuthenticatable&Model $user
* @property Model&MultiFactorAuthenticatable $user
*/
class MultiFactor extends Model
{
Expand Down
4 changes: 3 additions & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

declare(strict_types=1);

use Worksome\MultiFactorAuth\Tests\TestCase;

uses(TestCase::class)->in(__DIR__ . '/Feature');
uses(TestCase::class)->in('Feature');

// Test functions

Expand Down

0 comments on commit 56d757d

Please sign in to comment.