Skip to content

Commit 50164ab

Browse files
Merge pull request #41 from TFSThiagoBR98/1.x
[1.2] Add Laravel 10 Support
2 parents 099ae78 + 335f3ff commit 50164ab

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

.github/workflows/php.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: "Set up PHP"
3030
uses: "shivammathur/setup-php@v2"
3131
with:
32-
php-version: "8.1"
32+
php-version: "8.2"
3333
tools: "parallel-lint"
3434

3535
- name: "Checkout code"
@@ -48,15 +48,21 @@ jobs:
4848
- "syntax_errors"
4949
runs-on: "ubuntu-latest"
5050
strategy:
51+
fail-fast: false
5152
matrix:
5253
php-version:
5354
- "8.0"
5455
- "8.1"
56+
- "8.2"
5557
laravel-constrain:
5658
- "9.*"
59+
- "10.*"
5760
dependencies:
5861
- "lowest"
5962
- "highest"
63+
exclude:
64+
- laravel-constrain: "10.*"
65+
php-version: "8.0"
6066
steps:
6167
- name: "Set up PHP"
6268
uses: "shivammathur/setup-php@v2"
@@ -68,6 +74,18 @@ jobs:
6874
- name: "Checkout code"
6975
uses: "actions/checkout@v3"
7076

77+
- name: Set Minimum PHP 8.1 Version for ramsey/collection
78+
run: composer require ramsey/collection:^1.2 --no-interaction --no-update
79+
if: matrix.php-version >= 8.1
80+
81+
- name: Set Minimum PHP 8.2 Version for nesbot/carbon
82+
run: composer require nesbot/carbon:^2.62.1 --no-interaction --no-update
83+
if: matrix.php-version >= 8.2
84+
85+
- name: Set Minimum PHP 8.2 Version for orchestra/testbench
86+
run: composer require --dev orchestra/testbench:^7.10 --no-interaction --no-update
87+
if: matrix.php-version >= 8.2
88+
7189
- name: "Install dependencies"
7290
uses: "ramsey/composer-install@v2"
7391
with:

composer.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
"laragear/meta": "^1.3",
3030
"bacon/bacon-qr-code": "^2.0",
3131
"paragonie/constant_time_encoding": "^2.5",
32-
"illuminate/config": "9.*",
33-
"illuminate/validation": "9.*",
34-
"illuminate/database": "9.*",
35-
"illuminate/support": "9.*",
36-
"illuminate/http": "9.*",
37-
"illuminate/auth": "9.*"
32+
"illuminate/config": "^9.0|^10.0",
33+
"illuminate/validation": "^9.0|^10.0",
34+
"illuminate/database": "^9.0|^10.0",
35+
"illuminate/support": "^9.0|^10.0",
36+
"illuminate/http": "^9.0|^10.0",
37+
"illuminate/auth": "^9.0|^10.0"
3838
},
3939
"require-dev": {
4040
"mockery/mockery": "^1.5",
41-
"orchestra/testbench": "7.*",
41+
"orchestra/testbench": "^7.0|^8.0",
4242
"phpunit/phpunit": "^9.5"
4343
},
4444
"autoload": {

src/TwoFactorAuthentication.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ public function createTwoFactorAuth(): Contracts\TwoFactorTotp
103103
* @return string
104104
*/
105105
protected function twoFactorLabel(): string
106-
{
106+
{
107107
// If the developer has set acustom label for the app, use that. When not,
108108
// we will fallback to the issuer name. We will use that string to append
109109
// it to the user email so the authenticator shows the TOTP origin name.
110110
$issuer = config('two-factor.label') ?? config('two-factor.issuer');
111-
112-
return $issuer.':'.$this->getAttribute('email'));
111+
112+
return $issuer.':'.$this->getAttribute('email');
113113
}
114114

115115
/**

src/TwoFactorServiceProvider.php

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ protected function publishFiles(): void
7676
$this->publishes([static::CONFIG => $this->app->configPath('two-factor.php')], 'config');
7777
// @phpstan-ignore-next-line
7878
$this->publishes([static::VIEWS => $this->app->viewPath('vendor/two-factor')], 'views');
79-
// @phpstan-ignore-next-line
8079
$this->publishes([static::LANG => $this->app->langPath('vendor/two-factor')], 'translations');
8180
}
8281
}

0 commit comments

Comments
 (0)