Skip to content

Commit

Permalink
Merge branch '1.x-splade' into 1.x-splade-l11
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Mar 19, 2024
2 parents 23609d0 + 4b7bbc0 commit 1fdcd3f
Show file tree
Hide file tree
Showing 30 changed files with 46 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@1.0.0
uses: aglipanci/laravel-pint-action@2.3.0

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: rm -rf vendor/laravel/breeze

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: "vendor/laravel/breeze"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main

Expand All @@ -21,7 +21,7 @@ jobs:
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Update CHANGELOG
Expand Down
23 changes: 10 additions & 13 deletions src/Console/InstallsSpladeStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ protected function installSpladeStack()
// NPM Packages...
$this->updateNodePackages(function ($packages) {
return [
'@protonemedia/laravel-splade' => '^1.4.8',
'@tailwindcss/forms' => '^0.5.3',
'@tailwindcss/typography' => '^0.5.2',
'@vitejs/plugin-vue' => '^4.0.0',
'autoprefixer' => '^10.4.12',
'laravel-vite-plugin' => '^0.7.5',
'postcss' => '^8.4.18',
'tailwindcss' => '^3.3.0',
'vite' => '^4.0.0',
'vue' => '^3.2.41',
'@protonemedia/laravel-splade' => '^1.4.18',
'@tailwindcss/forms' => '^0.5.7',
'@tailwindcss/typography' => '^0.5.10',
'@vitejs/plugin-vue' => '^5.0',
'autoprefixer' => '^10.4.16',
'laravel-vite-plugin' => '^1.0',
'postcss' => '^8.4.32',
'tailwindcss' => '^3.4',
'vite' => '^5.0',
'vue' => '^3.4',
] + $packages;
});

Expand Down Expand Up @@ -86,9 +86,6 @@ protected function installSpladeStack()
copy($spladeBreezeStubsDir.'routes/web.php', base_path('routes/web.php'));
copy($spladeBreezeStubsDir.'routes/auth.php', base_path('routes/auth.php'));

// "Dashboard" Route...
$this->replaceInFile('/home', '/dashboard', app_path('Providers/RouteServiceProvider.php'));

// Tailwind / Vite...
copy($spladeBaseStubsDir.'tailwind.config.js', base_path('tailwind.config.js'));
copy($spladeBaseStubsDir.'postcss.config.js', base_path('postcss.config.js'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EmailVerificationNotificationController extends Controller
public function store(Request $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}

$request->user()->sendEmailVerificationNotification();
Expand Down
4 changes: 2 additions & 2 deletions stubs/api/app/Http/Controllers/Auth/VerifyEmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __invoke(EmailVerificationRequest $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(
config('app.frontend_url').RouteServiceProvider::HOME.'?verified=1'
config('app.frontend_url').'/dashboard?verified=1'
);
}

Expand All @@ -27,7 +27,7 @@ public function __invoke(EmailVerificationRequest $request)
}

return redirect()->intended(
config('app.frontend_url').RouteServiceProvider::HOME.'?verified=1'
config('app.frontend_url').'/dashboard?verified=1'
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

Event::assertDispatched(Verified::class);
expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
$response->assertRedirect(config('app.frontend_url').RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect(config('app.frontend_url').'/dashboard?verified=1');
});

test('email is not verified with invalid hash', function () {
Expand Down
2 changes: 1 addition & 1 deletion stubs/api/tests/Feature/Auth/EmailVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function test_email_can_be_verified()

Event::assertDispatched(Verified::class);
$this->assertTrue($user->fresh()->hasVerifiedEmail());
$response->assertRedirect(config('app.frontend_url').RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect(config('app.frontend_url').'/dashboard?verified=1');
}

public function test_email_is_not_verified_with_invalid_hash()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function store(LoginRequest $request)

$request->session()->regenerate();

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public function store(Request $request)

$request->session()->put('auth.password_confirmed_at', time());

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EmailVerificationNotificationController extends Controller
public function store(Request $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}

$request->user()->sendEmailVerificationNotification();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EmailVerificationPromptController extends Controller
public function __invoke(Request $request)
{
return $request->user()->hasVerifiedEmail()
? redirect()->intended(RouteServiceProvider::HOME)
? redirect()->intended('/dashboard')
: view('auth.verify-email');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public function store(Request $request)

Auth::login($user);

return redirect(RouteServiceProvider::HOME);
return redirect('/dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class VerifyEmailController extends Controller
public function __invoke(EmailVerificationRequest $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
return redirect()->intended('/dashboard?verified=1');
}

if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}

return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
return redirect()->intended('/dashboard?verified=1');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('/dashboard');
});

test('users can not authenticate with invalid password', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

Event::assertDispatched(Verified::class);
expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect('/dashboard?verified=1');
});

test('email is not verified with invalid hash', function () {
Expand Down
2 changes: 1 addition & 1 deletion stubs/default/pest-tests/Feature/Auth/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('/dashboard');
});
2 changes: 1 addition & 1 deletion stubs/default/tests/Feature/Auth/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function test_users_can_authenticate_using_the_login_screen()
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('/dashboard');
}

public function test_users_can_not_authenticate_with_invalid_password()
Expand Down
2 changes: 1 addition & 1 deletion stubs/default/tests/Feature/Auth/EmailVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function test_email_can_be_verified()

Event::assertDispatched(Verified::class);
$this->assertTrue($user->fresh()->hasVerifiedEmail());
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect('/dashboard?verified=1');
}

public function test_email_is_not_verified_with_invalid_hash()
Expand Down
2 changes: 1 addition & 1 deletion stubs/default/tests/Feature/Auth/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public function test_new_users_can_register()
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('/dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function store(LoginRequest $request)

$request->session()->regenerate();

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function store(Request $request)

$request->session()->put('auth.password_confirmed_at', time());

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EmailVerificationNotificationController extends Controller
public function store(Request $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended('/dashboard');
}

$request->user()->sendEmailVerificationNotification();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EmailVerificationPromptController extends Controller
public function __invoke(Request $request)
{
return $request->user()->hasVerifiedEmail()
? redirect()->intended(RouteServiceProvider::HOME)
? redirect()->intended('/dashboard')
: Inertia::render('Auth/VerifyEmail', ['status' => session('status')]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ public function store(Request $request)

Auth::login($user);

return redirect(RouteServiceProvider::HOME);
return redirect('/dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class VerifyEmailController extends Controller
public function __invoke(EmailVerificationRequest $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
return redirect()->intended('/dashboard?verified=1');
}

if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}

return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
return redirect()->intended('/dashboard?verified=1');
}
}
2 changes: 1 addition & 1 deletion stubs/splade/dusk-tests/Auth/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function test_users_can_authenticate_using_the_login_screen()
->type('email', $user->email)
->type('password', 'password')
->press('Log in')
->waitForLocation(RouteServiceProvider::HOME)
->waitForLocation('/dashboard')
->assertAuthenticatedAs($user);
});
}
Expand Down
2 changes: 1 addition & 1 deletion stubs/splade/dusk-tests/Auth/EmailVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function test_email_can_be_verified()
$browser->loginAs($user)
->visit($verificationUrl)
->waitForText('You\'re logged in!')
->assertPathIs(RouteServiceProvider::HOME)
->assertPathIs('/dashboard')
->assertQueryStringHas('verified', 1);

$this->assertTrue($user->fresh()->hasVerifiedEmail());
Expand Down
4 changes: 2 additions & 2 deletions stubs/splade/dusk-tests/Auth/PasswordConfirmationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function test_password_can_be_confirmed()
->waitForText('Please confirm your password before continuing.')
->type('password', 'password')
->press('Confirm')
->waitForLocation(RouteServiceProvider::HOME)
->assertPathIs(RouteServiceProvider::HOME);
->waitForLocation('/dashboard')
->assertPathIs('/dashboard');
});
}

Expand Down
2 changes: 1 addition & 1 deletion stubs/splade/dusk-tests/Auth/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function test_new_users_can_register()
->type('password', 'password')
->type('password_confirmation', 'password')
->press('Register')
->waitForLocation(RouteServiceProvider::HOME)
->waitForLocation('/dashboard')
->assertAuthenticated();
});
}
Expand Down

0 comments on commit 1fdcd3f

Please sign in to comment.