From b242ef865a039fd6a11f4c97e1fff0682a00013d Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Thu, 10 Sep 2020 13:55:22 +0200 Subject: [PATCH 1/9] Upgraded Laravel to v8.0 --- .github/actions/common/setup | 2 +- .github/workflows/run-tests-on-laravel.yml | 4 ++-- composer.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/common/setup b/.github/actions/common/setup index b6a775b..b5ded99 100644 --- a/.github/actions/common/setup +++ b/.github/actions/common/setup @@ -5,7 +5,7 @@ commit="tmp-$(git rev-parse --verify HEAD)" git checkout -b $commit # Create Laravel project -composer create-project --prefer-dist laravel/laravel test-app '7.*' +composer create-project --prefer-dist laravel/laravel test-app '8.*' cd test-app # Require Laravel auth preset and setup views diff --git a/.github/workflows/run-tests-on-laravel.yml b/.github/workflows/run-tests-on-laravel.yml index 3db33d7..10a3a16 100644 --- a/.github/workflows/run-tests-on-laravel.yml +++ b/.github/workflows/run-tests-on-laravel.yml @@ -9,7 +9,7 @@ on: jobs: test_without_email_verification: - name: (PHP ${{ matrix.php }}, Laravel 7) Tests without email verification + name: (PHP ${{ matrix.php }}, Laravel 8) Tests without email verification runs-on: ubuntu-latest strategy: matrix: @@ -37,7 +37,7 @@ jobs: run: ( cd test-app && ./vendor/bin/phpunit ) test_with_email_verification: - name: (PHP ${{ matrix.php }}, Laravel 7) Tests with email verification + name: (PHP ${{ matrix.php }}, Laravel 8) Tests with email verification runs-on: ubuntu-latest strategy: matrix: diff --git a/composer.json b/composer.json index c17d9bd..cef6d1f 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "laravel/framework": "^7.0" + "laravel/framework": "^8.0" }, "extra": { "laravel": { From bcd114807892dbd3f845fd7db6ea6e6d3c55d0a2 Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Thu, 10 Sep 2020 13:57:08 +0200 Subject: [PATCH 2/9] Dropped PHP 7.2 support --- .github/workflows/run-tests-on-laravel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests-on-laravel.yml b/.github/workflows/run-tests-on-laravel.yml index 10a3a16..83a88e3 100644 --- a/.github/workflows/run-tests-on-laravel.yml +++ b/.github/workflows/run-tests-on-laravel.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['7.2', '7.3', '7.4'] + php: ['7.3', '7.4'] steps: - uses: actions/checkout@v2 @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['7.2', '7.3', '7.4'] + php: ['7.3', '7.4'] steps: - uses: actions/checkout@v2 From 758822ed521e2808bd51ef1a10b65ce48fe9fa96 Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Thu, 10 Sep 2020 21:34:59 +0200 Subject: [PATCH 3/9] Changed the default User class namespace --- src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php | 2 +- src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php | 2 +- src/Console/stubs/tests/Feature/Auth/LoginTest.php | 2 +- src/Console/stubs/tests/Feature/Auth/RegisterTest.php | 2 +- src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php b/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php index a266c31..74c7341 100644 --- a/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php +++ b/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php @@ -2,8 +2,8 @@ namespace Tests\Feature\Auth; -use App\User; use Tests\TestCase; +use App\Models\User; use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\Notification; use Illuminate\Auth\Notifications\VerifyEmail; diff --git a/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php b/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php index bb78260..55503aa 100644 --- a/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php +++ b/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php @@ -2,8 +2,8 @@ namespace Tests\Feature\Auth; -use App\User; use Tests\TestCase; +use App\Models\User; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Notification; diff --git a/src/Console/stubs/tests/Feature/Auth/LoginTest.php b/src/Console/stubs/tests/Feature/Auth/LoginTest.php index ad6aaf2..09f9d3a 100644 --- a/src/Console/stubs/tests/Feature/Auth/LoginTest.php +++ b/src/Console/stubs/tests/Feature/Auth/LoginTest.php @@ -2,8 +2,8 @@ namespace Tests\Feature\Auth; -use App\User; use Tests\TestCase; +use App\Models\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Foundation\Testing\RefreshDatabase; diff --git a/src/Console/stubs/tests/Feature/Auth/RegisterTest.php b/src/Console/stubs/tests/Feature/Auth/RegisterTest.php index c8e85e3..338981f 100644 --- a/src/Console/stubs/tests/Feature/Auth/RegisterTest.php +++ b/src/Console/stubs/tests/Feature/Auth/RegisterTest.php @@ -2,8 +2,8 @@ namespace Tests\Feature\Auth; -use App\User; use Tests\TestCase; +use App\Models\User; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Event; use Illuminate\Auth\Events\Registered; diff --git a/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php b/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php index ccbad05..980ed8c 100644 --- a/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php +++ b/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php @@ -2,8 +2,8 @@ namespace Tests\Feature\Auth; -use App\User; use Tests\TestCase; +use App\Models\User; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Password; From 9a2caf72ff3ead8e0539e0728b6b02243325fe13 Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Thu, 10 Sep 2020 21:37:03 +0200 Subject: [PATCH 4/9] Changed the default import sorting method Laravel changed the way they import files from line-length based sort to alphabetical based sort --- .../stubs/tests/Feature/Auth/EmailVerificationTest.php | 6 +++--- .../stubs/tests/Feature/Auth/ForgotPasswordTest.php | 6 +++--- src/Console/stubs/tests/Feature/Auth/LoginTest.php | 4 ++-- src/Console/stubs/tests/Feature/Auth/RegisterTest.php | 6 +++--- .../stubs/tests/Feature/Auth/ResetPasswordTest.php | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php b/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php index 74c7341..52ac366 100644 --- a/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php +++ b/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php @@ -2,12 +2,12 @@ namespace Tests\Feature\Auth; -use Tests\TestCase; use App\Models\User; -use Illuminate\Support\Facades\URL; -use Illuminate\Support\Facades\Notification; use Illuminate\Auth\Notifications\VerifyEmail; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Support\Facades\Notification; +use Illuminate\Support\Facades\URL; +use Tests\TestCase; class EmailVerificationTest extends TestCase { diff --git a/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php b/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php index 55503aa..b5041c1 100644 --- a/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php +++ b/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php @@ -2,13 +2,13 @@ namespace Tests\Feature\Auth; -use Tests\TestCase; use App\Models\User; +use Illuminate\Auth\Notifications\ResetPassword; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Notification; -use Illuminate\Auth\Notifications\ResetPassword; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Tests\TestCase; class ForgotPasswordTest extends TestCase { diff --git a/src/Console/stubs/tests/Feature/Auth/LoginTest.php b/src/Console/stubs/tests/Feature/Auth/LoginTest.php index 09f9d3a..7a51393 100644 --- a/src/Console/stubs/tests/Feature/Auth/LoginTest.php +++ b/src/Console/stubs/tests/Feature/Auth/LoginTest.php @@ -2,11 +2,11 @@ namespace Tests\Feature\Auth; -use Tests\TestCase; use App\Models\User; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Tests\TestCase; class LoginTest extends TestCase { diff --git a/src/Console/stubs/tests/Feature/Auth/RegisterTest.php b/src/Console/stubs/tests/Feature/Auth/RegisterTest.php index 338981f..3ac0c69 100644 --- a/src/Console/stubs/tests/Feature/Auth/RegisterTest.php +++ b/src/Console/stubs/tests/Feature/Auth/RegisterTest.php @@ -2,12 +2,12 @@ namespace Tests\Feature\Auth; -use Tests\TestCase; use App\Models\User; -use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Facades\Event; use Illuminate\Auth\Events\Registered; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Support\Facades\Event; +use Illuminate\Support\Facades\Hash; +use Tests\TestCase; class RegisterTest extends TestCase { diff --git a/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php b/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php index 980ed8c..146e5fa 100644 --- a/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php +++ b/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php @@ -2,13 +2,13 @@ namespace Tests\Feature\Auth; -use Tests\TestCase; use App\Models\User; -use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Facades\Event; -use Illuminate\Support\Facades\Password; use Illuminate\Auth\Events\PasswordReset; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Support\Facades\Event; +use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\Password; +use Tests\TestCase; class ResetPasswordTest extends TestCase { From 1841f855de07cade2a7f3229d943ac7a66981e8c Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Thu, 10 Sep 2020 21:45:22 +0200 Subject: [PATCH 5/9] Changed the factory function into the new class-based approach --- .../Feature/Auth/EmailVerificationTest.php | 20 +++++++++---------- .../tests/Feature/Auth/ForgotPasswordTest.php | 6 +++--- .../stubs/tests/Feature/Auth/LoginTest.php | 12 +++++------ .../stubs/tests/Feature/Auth/RegisterTest.php | 2 +- .../tests/Feature/Auth/ResetPasswordTest.php | 12 +++++------ 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php b/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php index 52ac366..c8def6b 100644 --- a/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php +++ b/src/Console/stubs/tests/Feature/Auth/EmailVerificationTest.php @@ -60,7 +60,7 @@ public function testGuestCannotSeeTheVerificationNotice() public function testUserSeesTheVerificationNoticeWhenNotVerified() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => null, ]); @@ -72,7 +72,7 @@ public function testUserSeesTheVerificationNoticeWhenNotVerified() public function testVerifiedUserIsRedirectedHomeWhenVisitingVerificationNoticeRoute() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => now(), ]); @@ -83,7 +83,7 @@ public function testVerifiedUserIsRedirectedHomeWhenVisitingVerificationNoticeRo public function testGuestCannotSeeTheVerificationVerifyRoute() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'id' => 1, 'email_verified_at' => null, ]); @@ -95,12 +95,12 @@ public function testGuestCannotSeeTheVerificationVerifyRoute() public function testUserCannotVerifyOthers() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'id' => 1, 'email_verified_at' => null, ]); - $user2 = factory(User::class)->create(['id' => 2, 'email_verified_at' => null]); + $user2 = User::factory()->create(['id' => 2, 'email_verified_at' => null]); $response = $this->actingAs($user)->get($this->validVerificationVerifyRoute($user2)); @@ -110,7 +110,7 @@ public function testUserCannotVerifyOthers() public function testUserIsRedirectedToCorrectRouteWhenAlreadyVerified() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => now(), ]); @@ -121,7 +121,7 @@ public function testUserIsRedirectedToCorrectRouteWhenAlreadyVerified() public function testForbiddenIsReturnedWhenSignatureIsInvalidInVerificationVerifyRoute() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => now(), ]); @@ -132,7 +132,7 @@ public function testForbiddenIsReturnedWhenSignatureIsInvalidInVerificationVerif public function testUserCanVerifyThemselves() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => null, ]); @@ -151,7 +151,7 @@ public function testGuestCannotResendAVerificationEmail() public function testUserIsRedirectedToCorrectRouteIfAlreadyVerified() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => now(), ]); @@ -163,7 +163,7 @@ public function testUserIsRedirectedToCorrectRouteIfAlreadyVerified() public function testUserCanResendAVerificationEmail() { Notification::fake(); - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email_verified_at' => null, ]); diff --git a/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php b/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php index b5041c1..f76ed41 100644 --- a/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php +++ b/src/Console/stubs/tests/Feature/Auth/ForgotPasswordTest.php @@ -39,7 +39,7 @@ public function testUserCanViewAnEmailPasswordForm() public function testUserCanViewAnEmailPasswordFormWhenAuthenticated() { - $user = factory(User::class)->make(); + $user = User::factory()->make(); $response = $this->actingAs($user)->get($this->passwordRequestRoute()); @@ -50,7 +50,7 @@ public function testUserCanViewAnEmailPasswordFormWhenAuthenticated() public function testUserReceivesAnEmailWithAPasswordResetLink() { Notification::fake(); - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'email' => 'john@example.com', ]); @@ -74,7 +74,7 @@ public function testUserDoesNotReceiveEmailWhenNotRegistered() $response->assertRedirect($this->passwordEmailGetRoute()); $response->assertSessionHasErrors('email'); - Notification::assertNotSentTo(factory(User::class)->make(['email' => 'nobody@example.com']), ResetPassword::class); + Notification::assertNotSentTo(User::factory()->make(['email' => 'nobody@example.com']), ResetPassword::class); } public function testEmailIsRequired() diff --git a/src/Console/stubs/tests/Feature/Auth/LoginTest.php b/src/Console/stubs/tests/Feature/Auth/LoginTest.php index 7a51393..30439b0 100644 --- a/src/Console/stubs/tests/Feature/Auth/LoginTest.php +++ b/src/Console/stubs/tests/Feature/Auth/LoginTest.php @@ -57,7 +57,7 @@ public function testUserCanViewALoginForm() public function testUserCannotViewALoginFormWhenAuthenticated() { - $user = factory(User::class)->make(); + $user = User::factory()->make(); $response = $this->actingAs($user)->get($this->loginGetRoute()); @@ -66,7 +66,7 @@ public function testUserCannotViewALoginFormWhenAuthenticated() public function testUserCanLoginWithCorrectCredentials() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'password' => Hash::make($password = 'i-love-laravel'), ]); @@ -81,7 +81,7 @@ public function testUserCanLoginWithCorrectCredentials() public function testRememberMeFunctionality() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'id' => random_int(1, 100), 'password' => Hash::make($password = 'i-love-laravel'), ]); @@ -105,7 +105,7 @@ public function testRememberMeFunctionality() public function testUserCannotLoginWithIncorrectPassword() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'password' => Hash::make('i-love-laravel'), ]); @@ -137,7 +137,7 @@ public function testUserCannotLoginWithEmailThatDoesNotExist() public function testUserCanLogout() { - $this->be(factory(User::class)->create()); + $this->be(User::factory()->create()); $response = $this->post($this->logoutRoute()); @@ -155,7 +155,7 @@ public function testUserCannotLogoutWhenNotAuthenticated() public function testUserCannotMakeMoreThanFiveAttemptsInOneMinute() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'password' => Hash::make($password = 'i-love-laravel'), ]); diff --git a/src/Console/stubs/tests/Feature/Auth/RegisterTest.php b/src/Console/stubs/tests/Feature/Auth/RegisterTest.php index 3ac0c69..d38a685 100644 --- a/src/Console/stubs/tests/Feature/Auth/RegisterTest.php +++ b/src/Console/stubs/tests/Feature/Auth/RegisterTest.php @@ -43,7 +43,7 @@ public function testUserCanViewARegistrationForm() public function testUserCannotViewARegistrationFormWhenAuthenticated() { - $user = factory(User::class)->make(); + $user = User::factory()->make(); $response = $this->actingAs($user)->get($this->registerGetRoute()); diff --git a/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php b/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php index 146e5fa..da57c4d 100644 --- a/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php +++ b/src/Console/stubs/tests/Feature/Auth/ResetPasswordTest.php @@ -41,7 +41,7 @@ protected function successfulPasswordResetRoute() public function testUserCanViewAPasswordResetForm() { - $user = factory(User::class)->create(); + $user = User::factory()->create(); $response = $this->get($this->passwordResetGetRoute($token = $this->getValidToken($user))); @@ -52,7 +52,7 @@ public function testUserCanViewAPasswordResetForm() public function testUserCanViewAPasswordResetFormWhenAuthenticated() { - $user = factory(User::class)->create(); + $user = User::factory()->create(); $response = $this->actingAs($user)->get($this->passwordResetGetRoute($token = $this->getValidToken($user))); @@ -64,7 +64,7 @@ public function testUserCanViewAPasswordResetFormWhenAuthenticated() public function testUserCanResetPasswordWithValidToken() { Event::fake(); - $user = factory(User::class)->create(); + $user = User::factory()->create(); $response = $this->post($this->passwordResetPostRoute(), [ 'token' => $this->getValidToken($user), @@ -84,7 +84,7 @@ public function testUserCanResetPasswordWithValidToken() public function testUserCannotResetPasswordWithInvalidToken() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'password' => Hash::make('old-password'), ]); @@ -103,7 +103,7 @@ public function testUserCannotResetPasswordWithInvalidToken() public function testUserCannotResetPasswordWithoutProvidingANewPassword() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'password' => Hash::make('old-password'), ]); @@ -125,7 +125,7 @@ public function testUserCannotResetPasswordWithoutProvidingANewPassword() public function testUserCannotResetPasswordWithoutProvidingAnEmail() { - $user = factory(User::class)->create([ + $user = User::factory()->create([ 'password' => Hash::make('old-password'), ]); From f08a5f812115d2c80898dc621794b09275d6be09 Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Tue, 18 Aug 2020 13:10:43 +0200 Subject: [PATCH 6/9] Replace the depracated phpunit method --- src/Console/stubs/tests/Feature/Auth/LoginTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/stubs/tests/Feature/Auth/LoginTest.php b/src/Console/stubs/tests/Feature/Auth/LoginTest.php index 30439b0..811223c 100644 --- a/src/Console/stubs/tests/Feature/Auth/LoginTest.php +++ b/src/Console/stubs/tests/Feature/Auth/LoginTest.php @@ -168,7 +168,7 @@ public function testUserCannotMakeMoreThanFiveAttemptsInOneMinute() $response->assertRedirect($this->loginGetRoute()); $response->assertSessionHasErrors('email'); - $this->assertRegExp( + $this->assertMatchesRegularExpression( $this->getTooManyLoginAttemptsMessage(), collect( $response From c6bbbff7fa64cffef0c85ecdf752fa7f329b1f9a Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Fri, 11 Sep 2020 19:05:17 +0200 Subject: [PATCH 7/9] Fixed User file directory --- .github/actions/tests-with-email-verification | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/tests-with-email-verification b/.github/actions/tests-with-email-verification index 7387cc5..46eec69 100644 --- a/.github/actions/tests-with-email-verification +++ b/.github/actions/tests-with-email-verification @@ -8,4 +8,4 @@ php artisan make:auth-tests # Prepare for running tests sed -i 's###g' phpunit.xml sed -i $'s#Auth::routes();#Auth::routes(\[\'verify\' => true\]);#g' ./routes/web.php -sed -i 's#extends Authenticatable#extends Authenticatable implements MustVerifyEmail#g' ./app/User.php +sed -i 's#extends Authenticatable#extends Authenticatable implements MustVerifyEmail#g' ./app/Models/User.php diff --git a/README.md b/README.md index 89d6015..9d4f569 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ If you want to use the e-mail verification feature, you will have to make follow - Auth::routes(); + Auth::routes(['verify' => true]); ``` -- update `app/User.php`: +- update `app/Models/User.php`: ```diff - class User extends Authenticatable + class User extends Authenticatable implements MustVerifyEmail From 3fc83671c78a64615dcfc2b4755803e741f98b22 Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Fri, 11 Sep 2020 17:05:29 +0000 Subject: [PATCH 8/9] Apply fixes from StyleCI --- src/AuthTestsServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AuthTestsServiceProvider.php b/src/AuthTestsServiceProvider.php index 04941ca..1488d59 100644 --- a/src/AuthTestsServiceProvider.php +++ b/src/AuthTestsServiceProvider.php @@ -2,8 +2,8 @@ namespace DCzajkowski\AuthTests; -use Illuminate\Support\ServiceProvider; use DCzajkowski\AuthTests\Console\Commands\AuthTestsMakeCommand; +use Illuminate\Support\ServiceProvider; class AuthTestsServiceProvider extends ServiceProvider { From 400417832335fa3f3c62ecdd183e62e8b9ff9fe5 Mon Sep 17 00:00:00 2001 From: Dariusz Czajkowski Date: Fri, 11 Sep 2020 19:21:00 +0200 Subject: [PATCH 9/9] Added a deprecation notice to the README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 9d4f569..fc0c1ca 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,13 @@ ![](https://i.imgur.com/1z5XkDc.png) +## ⚠️ Deprecation notice ⚠️ +As of Laravel 8, the [laravel/ui](https://github.com/laravel/ui) package is discouraged to be used on new Laravel installations. **This package should be used only with already-existing, created with Laravel 7 or lower, applications that use laravel/ui auth controllers.** + +All of the applications already using [laravel/ui](https://github.com/laravel/ui) will get updates of this package to new Laravel versions, although the support may be dropped in the future. This doesn't mean you won't be able to use the package or upgrade to new Laravel versions, but that the upgrades to the major versions may require manual changes from the consumers of this package. + +The new way of installing Laravel 8's and above auth scaffolding is using the `--jet` option in the Laravel installer. Laravel [Jetstream](https://github.com/laravel/jetstream) hides all of its controllers inside the package, meaning it doesn't make sense to test those controllers, as they [are already tested inside the package](https://github.com/laravel/jetstream/tree/1.x/tests). + ## Versioning ~The version of this package reflects current major version of the Laravel framework. For example: If Laravel framework has version 5.6, version of this package compatible will be `5.6.*`.~