Skip to content

Commit

Permalink
Merge pull request #41 from TFSThiagoBR98/1.x
Browse files Browse the repository at this point in the history
[1.2] Add Laravel 10 Support
  • Loading branch information
DarkGhostHunter authored Feb 15, 2023
2 parents 099ae78 + 335f3ff commit 50164ab
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -48,15 +48,21 @@ jobs:
- "syntax_errors"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
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"
Expand All @@ -68,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:
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/TwoFactorAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ 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'));

return $issuer.':'.$this->getAttribute('email');
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/TwoFactorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ protected function publishFiles(): void
$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');
}
}

0 comments on commit 50164ab

Please sign in to comment.