From f956c6f5aabce828ca0ad93a7d92ce698a2a1b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Fran=C3=A7a=20da=20Silva?= Date: Tue, 14 Feb 2023 20:49:51 -0300 Subject: [PATCH 1/6] fix(syntax): remove extra ( from twoFactorLabel return --- src/TwoFactorAuthentication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TwoFactorAuthentication.php b/src/TwoFactorAuthentication.php index ff44460..815f14f 100644 --- a/src/TwoFactorAuthentication.php +++ b/src/TwoFactorAuthentication.php @@ -109,7 +109,7 @@ protected function twoFactorLabel(): string // it to the user email so the authenticator shows the TOTP origin name. $issuer = config('two-factor.label') ?? config('two-factor.issuer'); - return $issuer.':'.$this->getAttribute('email')); + return $issuer.':'.$this->getAttribute('email'); } /** From 20a59f70a3c1c416d0a7a3d9fd69c85fc33f5ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Fran=C3=A7a=20da=20Silva?= Date: Tue, 14 Feb 2023 20:51:24 -0300 Subject: [PATCH 2/6] Add Laravel 10 Support --- .github/workflows/php.yml | 7 ++++++- composer.json | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b7bcd8f..742ec30 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -29,7 +29,7 @@ jobs: - name: "Set up PHP" uses: "shivammathur/setup-php@v2" with: - php-version: "8.1" + php-version: "8.2" tools: "parallel-lint" - name: "Checkout code" @@ -52,11 +52,16 @@ jobs: php-version: - "8.0" - "8.1" + - "8.2" laravel-constrain: - "9.*" + - "10.*" dependencies: - "lowest" - "highest" + exclude: + - laravel-constrain: 10.* + php-version: 8.0 steps: - name: "Set up PHP" uses: "shivammathur/setup-php@v2" diff --git a/composer.json b/composer.json index 172a128..a9cd70b 100644 --- a/composer.json +++ b/composer.json @@ -29,16 +29,16 @@ "laragear/meta": "^1.3", "bacon/bacon-qr-code": "^2.0", "paragonie/constant_time_encoding": "^2.5", - "illuminate/config": "9.*", - "illuminate/validation": "9.*", - "illuminate/database": "9.*", - "illuminate/support": "9.*", - "illuminate/http": "9.*", - "illuminate/auth": "9.*" + "illuminate/config": "^9.0|^10.0", + "illuminate/validation": "^9.0|^10.0", + "illuminate/database": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0", + "illuminate/http": "^9.0|^10.0", + "illuminate/auth": "^9.0|^10.0" }, "require-dev": { "mockery/mockery": "^1.5", - "orchestra/testbench": "7.*", + "orchestra/testbench": "^7.0|^8.0", "phpunit/phpunit": "^9.5" }, "autoload": { From 09e7fe2cac039b771d4378ab20d444a7c6081d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Fran=C3=A7a=20da=20Silva?= Date: Tue, 14 Feb 2023 21:00:21 -0300 Subject: [PATCH 3/6] fix --- src/TwoFactorAuthentication.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TwoFactorAuthentication.php b/src/TwoFactorAuthentication.php index 815f14f..734c1dc 100644 --- a/src/TwoFactorAuthentication.php +++ b/src/TwoFactorAuthentication.php @@ -103,12 +103,12 @@ public function createTwoFactorAuth(): Contracts\TwoFactorTotp * @return string */ protected function twoFactorLabel(): string - { + { // If the developer has set acustom label for the app, use that. When not, // we will fallback to the issuer name. We will use that string to append // it to the user email so the authenticator shows the TOTP origin name. $issuer = config('two-factor.label') ?? config('two-factor.issuer'); - + return $issuer.':'.$this->getAttribute('email'); } From 3b9e706551a64acde8b4837f5fd64b3701802e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Fran=C3=A7a=20da=20Silva?= Date: Wed, 15 Feb 2023 09:30:43 -0300 Subject: [PATCH 4/6] fix ci --- .github/workflows/php.yml | 5 +++-- src/TwoFactorServiceProvider.php | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 742ec30..2a8644a 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -48,6 +48,7 @@ jobs: - "syntax_errors" runs-on: "ubuntu-latest" strategy: + fail-fast: false matrix: php-version: - "8.0" @@ -60,8 +61,8 @@ jobs: - "lowest" - "highest" exclude: - - laravel-constrain: 10.* - php-version: 8.0 + - laravel-constrain: "10.*" + php-version: "8.0" steps: - name: "Set up PHP" uses: "shivammathur/setup-php@v2" diff --git a/src/TwoFactorServiceProvider.php b/src/TwoFactorServiceProvider.php index 0305594..796a46a 100644 --- a/src/TwoFactorServiceProvider.php +++ b/src/TwoFactorServiceProvider.php @@ -74,7 +74,6 @@ protected function publishFiles(): void $this->publishesMigrations(static::DB); $this->publishes([static::CONFIG => $this->app->configPath('two-factor.php')], 'config'); - // @phpstan-ignore-next-line $this->publishes([static::VIEWS => $this->app->viewPath('vendor/two-factor')], 'views'); // @phpstan-ignore-next-line $this->publishes([static::LANG => $this->app->langPath('vendor/two-factor')], 'translations'); From 4784d22084d3d9f0e068843b1614cb3fd3fc1300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Fran=C3=A7a=20da=20Silva?= Date: Wed, 15 Feb 2023 14:00:39 -0300 Subject: [PATCH 5/6] fix ci --- src/TwoFactorServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TwoFactorServiceProvider.php b/src/TwoFactorServiceProvider.php index 796a46a..1bd02ae 100644 --- a/src/TwoFactorServiceProvider.php +++ b/src/TwoFactorServiceProvider.php @@ -74,8 +74,8 @@ protected function publishFiles(): void $this->publishesMigrations(static::DB); $this->publishes([static::CONFIG => $this->app->configPath('two-factor.php')], 'config'); - $this->publishes([static::VIEWS => $this->app->viewPath('vendor/two-factor')], 'views'); // @phpstan-ignore-next-line + $this->publishes([static::VIEWS => $this->app->viewPath('vendor/two-factor')], 'views'); $this->publishes([static::LANG => $this->app->langPath('vendor/two-factor')], 'translations'); } } From 335f3ff9aac7ad55f37bd0f5c5a4e4a3db93ff9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Fran=C3=A7a=20da=20Silva?= Date: Wed, 15 Feb 2023 14:47:07 -0300 Subject: [PATCH 6/6] fix ci --- .github/workflows/php.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2a8644a..a92176e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -74,6 +74,18 @@ jobs: - name: "Checkout code" uses: "actions/checkout@v3" + - name: Set Minimum PHP 8.1 Version for ramsey/collection + run: composer require ramsey/collection:^1.2 --no-interaction --no-update + if: matrix.php-version >= 8.1 + + - name: Set Minimum PHP 8.2 Version for nesbot/carbon + run: composer require nesbot/carbon:^2.62.1 --no-interaction --no-update + if: matrix.php-version >= 8.2 + + - name: Set Minimum PHP 8.2 Version for orchestra/testbench + run: composer require --dev orchestra/testbench:^7.10 --no-interaction --no-update + if: matrix.php-version >= 8.2 + - name: "Install dependencies" uses: "ramsey/composer-install@v2" with: