From 5c521d5d3a8a2fdff80433aa2ae8aff3e12b10e4 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Wed, 4 Jan 2023 09:30:55 +0000 Subject: [PATCH] feat: require PHP 8.2 or later --- .github/workflows/static.yml | 2 +- .github/workflows/tests.yml | 7 ++----- composer.json | 16 ++++++++-------- src/Drivers/Totp/BasicTotpDriver.php | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 162a7a6..3e1c4a2 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -16,7 +16,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' coverage: none - name: Install composer dependencies diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e506afb..adbc50f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,12 +15,9 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.1] + php: [8.2] laravel: ['^9.22'] stability: [prefer-lowest, prefer-stable] - include: - - laravel: '^9.22' - testbench: '^7.0' name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} @@ -42,7 +39,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --ansi + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --ansi composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ansi - name: Execute tests diff --git a/composer.json b/composer.json index eb2c0b5..47f7716 100644 --- a/composer.json +++ b/composer.json @@ -16,22 +16,22 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "guzzlehttp/guzzle": "^7.5", - "laravel/framework": "^9.22", + "laravel/framework": "^9.46", "pragmarx/google2fa": "^8.0", - "spatie/laravel-package-tools": "^1.12.1" + "spatie/laravel-package-tools": "^1.13.8" }, "require-dev": { "nunomaduro/collision": "^6.3", - "nunomaduro/larastan": "^2.0", - "orchestra/testbench": "^7.8", - "pestphp/pest": "^1.22", + "nunomaduro/larastan": "^2.3.2", + "orchestra/testbench": "^7.18", + "pestphp/pest": "^1.22.3", "pestphp/pest-plugin-parallel": "^1.2", "pestphp/pest-plugin-laravel": "^1.1", "spatie/laravel-ray": "^1.30", - "worksome/pest-plugin-silence": "^0.1.1", - "worksome/coding-style": "^2.0" + "worksome/pest-plugin-silence": "^0.1.2", + "worksome/coding-style": "^2.3" }, "autoload": { "psr-4": { diff --git a/src/Drivers/Totp/BasicTotpDriver.php b/src/Drivers/Totp/BasicTotpDriver.php index 864f915..544b83c 100644 --- a/src/Drivers/Totp/BasicTotpDriver.php +++ b/src/Drivers/Totp/BasicTotpDriver.php @@ -19,7 +19,7 @@ public function __construct(private readonly Google2FA $engine, private readonly public function make(Identifier $to): CreationResponse { - return new CreationResponse($this->status ?? Status::PENDING); + return new CreationResponse(Status::PENDING); } public function verify(Identifier $to, string $code): bool