diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index fe7d815a1..c0402e3e2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -13,8 +13,13 @@ jobs:
strategy:
fail-fast: true
matrix:
- php: [7.3, 7.4, 8.0, 8.1]
- laravel: [^8.0]
+ php: [7.3, 7.4, '8.0', 8.1]
+ laravel: [8, 9]
+ exclude:
+ - php: 7.3
+ laravel: 9
+ - php: 7.4
+ laravel: 9
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
@@ -32,7 +37,7 @@ jobs:
- name: Install dependencies
run: |
- composer require "illuminate/contracts=${{ matrix.laravel }}" --no-update
+ composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 57d02b3fd..c0ae2bd1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,35 @@
# Release Notes
-## [Unreleased](https://github.com/laravel/jetstream/compare/v2.5.0...2.x)
+## [Unreleased](https://github.com/laravel/jetstream/compare/v2.6.2...2.x)
+
+
+## [v2.6.2 (2022-01-18)](https://github.com/laravel/jetstream/compare/v2.6.1...v2.6.2)
+
+### Changed
+- Route group Sanctum guard ([#957](https://github.com/laravel/jetstream/pull/957))
+- Add config option for guard ([82724e7](https://github.com/laravel/jetstream/commit/82724e7d7053fbaed82fcd9f196cdea4f1ca311f))
+- Make config stub and set default guard ([fff4df4](https://github.com/laravel/jetstream/commit/fff4df4dbe2ab9aa03ecd8f0120399b91ec6aef9))
+
+
+## [v2.6.1 (2022-01-13)](https://github.com/laravel/jetstream/compare/v2.6.0...v2.6.1)
+
+### Changed
+- Bump `inertiajs/inertia-laravel` ([#954](https://github.com/laravel/jetstream/pull/954))
+
+
+## [v2.6.0 (2022-01-12)](https://github.com/laravel/jetstream/compare/v2.5.1...v2.6.0)
+
+### Changed
+- Laravel 9 Support ([#948](https://github.com/laravel/jetstream/pull/948))
+- Anonymize default profile photo url calls ([#940](https://github.com/laravel/jetstream/pull/940))
+
+
+## [v2.5.1 (2022-01-04)](https://github.com/laravel/jetstream/compare/v2.5.0...v2.5.1)
+
+### Changed
+* Fixed a content reflow issue on slower connection in update profile info form ([#929](https://github.com/laravel/jetstream/pull/929))
+* Fixed a button spacing issue in dialog modal footer ([#930](https://github.com/laravel/jetstream/pull/930), [#935](https://github.com/laravel/jetstream/pull/935))
+* Show 'Unknown' instead of 'false' if other browser session Useragent details are not matched in library ([#934](https://github.com/laravel/jetstream/pull/934))
## [v2.5.0 (2021-12-14)](https://github.com/laravel/jetstream/compare/v2.4.4...v2.5.0)
diff --git a/composer.json b/composer.json
index 86e873e92..8a3c83c09 100644
--- a/composer.json
+++ b/composer.json
@@ -20,15 +20,15 @@
"require": {
"php": "^7.3|^8.0",
"ext-json": "*",
- "illuminate/support": "^8.0",
+ "illuminate/support": "^8.0|^9.0",
"jenssegers/agent": "^2.6",
- "laravel/fortify": "^1.6.1"
+ "laravel/fortify": "^1.9"
},
"require-dev": {
- "inertiajs/inertia-laravel": "^0.3",
- "laravel/sanctum": "^2.6",
+ "inertiajs/inertia-laravel": "^0.5.2",
+ "laravel/sanctum": "^2.7",
"mockery/mockery": "^1.0",
- "orchestra/testbench": "^6.0",
+ "orchestra/testbench": "^6.0|^7.0",
"phpunit/phpunit": "^9.3"
},
"autoload": {
diff --git a/config/jetstream.php b/config/jetstream.php
index a2f58daaa..5b4ab32ce 100644
--- a/config/jetstream.php
+++ b/config/jetstream.php
@@ -3,63 +3,9 @@
use Laravel\Jetstream\Features;
return [
-
- /*
- |--------------------------------------------------------------------------
- | Jetstream Stack
- |--------------------------------------------------------------------------
- |
- | This configuration value informs Jetstream which "stack" you will be
- | using for your application. In general, this value is set for you
- | during installation and will not need to be changed after that.
- |
- */
-
'stack' => 'inertia',
-
- /*
- |--------------------------------------------------------------------------
- | Jetstream Route Middleware
- |--------------------------------------------------------------------------
- |
- | Here you may specify which middleware Jetstream will assign to the routes
- | that it registers with the application. When necessary, you may modify
- | these middleware; however, this default value is usually sufficient.
- |
- */
-
'middleware' => ['web'],
-
- /*
- |--------------------------------------------------------------------------
- | Features
- |--------------------------------------------------------------------------
- |
- | Some of Jetstream's features are optional. You may disable the features
- | by removing them from this array. You're free to only remove some of
- | these features or you can even remove all of these if you need to.
- |
- */
-
- 'features' => [
- // Features::termsAndPrivacyPolicy(),
- // Features::profilePhotos(),
- // Features::api(),
- // Features::teams(['invitations' => true]),
- Features::accountDeletion(),
- ],
-
- /*
- |--------------------------------------------------------------------------
- | Profile Photo Disk
- |--------------------------------------------------------------------------
- |
- | This configuration value determines the default disk that will be used
- | when storing profile photos for your application's users. Typically
- | this will be the "public" disk but you may adjust this if needed.
- |
- */
-
+ 'features' => [Features::accountDeletion()],
'profile_photo_disk' => 'public',
/*
diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php
index 259df0939..84c648c7f 100644
--- a/database/migrations/2014_10_12_000000_create_users_table.php
+++ b/database/migrations/2014_10_12_000000_create_users_table.php
@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class CreateUsersTable extends Migration
+return new class extends Migration
{
/**
* Run the migrations.
@@ -35,4 +35,4 @@ public function down()
{
Schema::dropIfExists('users');
}
-}
+};
diff --git a/database/migrations/2020_05_21_100000_create_teams_table.php b/database/migrations/2020_05_21_100000_create_teams_table.php
index 8493e50e0..7920ac94b 100644
--- a/database/migrations/2020_05_21_100000_create_teams_table.php
+++ b/database/migrations/2020_05_21_100000_create_teams_table.php
@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class CreateTeamsTable extends Migration
+return new class extends Migration
{
/**
* Run the migrations.
@@ -31,4 +31,4 @@ public function down()
{
Schema::dropIfExists('teams');
}
-}
+};
diff --git a/database/migrations/2020_05_21_200000_create_team_user_table.php b/database/migrations/2020_05_21_200000_create_team_user_table.php
index 657e83204..20e1013b7 100644
--- a/database/migrations/2020_05_21_200000_create_team_user_table.php
+++ b/database/migrations/2020_05_21_200000_create_team_user_table.php
@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class CreateTeamUserTable extends Migration
+return new class extends Migration
{
/**
* Run the migrations.
@@ -33,4 +33,4 @@ public function down()
{
Schema::dropIfExists('team_user');
}
-}
+};
diff --git a/database/migrations/2020_05_21_300000_create_team_invitations_table.php b/database/migrations/2020_05_21_300000_create_team_invitations_table.php
index ef11c66fb..b655e7af2 100644
--- a/database/migrations/2020_05_21_300000_create_team_invitations_table.php
+++ b/database/migrations/2020_05_21_300000_create_team_invitations_table.php
@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class CreateTeamInvitationsTable extends Migration
+return new class extends Migration
{
/**
* Run the migrations.
@@ -33,4 +33,4 @@ public function down()
{
Schema::dropIfExists('team_invitations');
}
-}
+};
diff --git a/resources/views/components/confirmation-modal.blade.php b/resources/views/components/confirmation-modal.blade.php
index 039d493bd..ee4896ce4 100644
--- a/resources/views/components/confirmation-modal.blade.php
+++ b/resources/views/components/confirmation-modal.blade.php
@@ -21,7 +21,7 @@
-
+
{{ $footer }}
diff --git a/resources/views/components/confirms-password.blade.php b/resources/views/components/confirms-password.blade.php
index 50884e6c1..534118535 100644
--- a/resources/views/components/confirms-password.blade.php
+++ b/resources/views/components/confirms-password.blade.php
@@ -38,7 +38,7 @@
{{ __('Cancel') }}
-
+
{{ $button }}
diff --git a/routes/inertia.php b/routes/inertia.php
index 75d2ea41f..b46ec7a31 100644
--- a/routes/inertia.php
+++ b/routes/inertia.php
@@ -20,7 +20,11 @@
Route::get('/privacy-policy', [PrivacyPolicyController::class, 'show'])->name('policy.show');
}
- Route::group(['middleware' => ['auth', 'verified']], function () {
+ $authMiddleware = config('jetstream.guard')
+ ? 'auth:'.config('jetstream.guard')
+ : 'auth';
+
+ Route::group(['middleware' => [$authMiddleware, 'verified']], function () {
// User & Profile...
Route::get('/user/profile', [UserProfileController::class, 'show'])
->name('profile.show');
diff --git a/routes/livewire.php b/routes/livewire.php
index 47a17305c..bba64750f 100644
--- a/routes/livewire.php
+++ b/routes/livewire.php
@@ -16,7 +16,11 @@
Route::get('/privacy-policy', [PrivacyPolicyController::class, 'show'])->name('policy.show');
}
- Route::group(['middleware' => ['auth', 'verified']], function () {
+ $authMiddleware = config('jetstream.guard')
+ ? 'auth:'.config('jetstream.guard')
+ : 'auth';
+
+ Route::group(['middleware' => [$authMiddleware, 'verified']], function () {
// User & Profile...
Route::get('/user/profile', [UserProfileController::class, 'show'])
->name('profile.show');
diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php
index dcc7b5179..8d3929651 100644
--- a/src/Console/InstallCommand.php
+++ b/src/Console/InstallCommand.php
@@ -280,7 +280,7 @@ protected function livewireRouteDefinition()
protected function installInertiaStack()
{
// Install Inertia...
- $this->requireComposerPackages('inertiajs/inertia-laravel:^0.4.3', 'tightenco/ziggy:^1.0');
+ $this->requireComposerPackages('inertiajs/inertia-laravel:^0.5.2', 'tightenco/ziggy:^1.0');
// Install NPM packages...
$this->updateNodePackages(function ($packages) {
diff --git a/src/HasProfilePhoto.php b/src/HasProfilePhoto.php
index d5bb4ced8..08299e760 100644
--- a/src/HasProfilePhoto.php
+++ b/src/HasProfilePhoto.php
@@ -4,6 +4,7 @@
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
+use Illuminate\Support\Str;
use Laravel\Jetstream\Features;
trait HasProfilePhoto
@@ -40,6 +41,10 @@ public function deleteProfilePhoto()
return;
}
+ if (is_null($this->profile_photo_path)) {
+ return;
+ }
+
Storage::disk($this->profilePhotoDisk())->delete($this->profile_photo_path);
$this->forceFill([
@@ -66,7 +71,11 @@ public function getProfilePhotoUrlAttribute()
*/
protected function defaultProfilePhotoUrl()
{
- return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';
+ $name = trim(collect(explode(' ', $this->name))->map(function ($segment) {
+ return $segment[0] ?? '';
+ })->join(' '));
+
+ return 'https://ui-avatars.com/api/?name='.urlencode($name).'&color=7F9CF5&background=EBF4FF';
}
/**
diff --git a/src/JetstreamServiceProvider.php b/src/JetstreamServiceProvider.php
index 141ac8617..1f59d86f0 100644
--- a/src/JetstreamServiceProvider.php
+++ b/src/JetstreamServiceProvider.php
@@ -158,7 +158,7 @@ protected function configurePublishing()
}
$this->publishes([
- __DIR__.'/../config/jetstream.php' => config_path('jetstream.php'),
+ __DIR__.'/../stubs/config/jetstream.php' => config_path('jetstream.php'),
], 'jetstream-config');
$this->publishes([
diff --git a/stubs/config/jetstream.php b/stubs/config/jetstream.php
new file mode 100644
index 000000000..77cbe9e2d
--- /dev/null
+++ b/stubs/config/jetstream.php
@@ -0,0 +1,78 @@
+ 'inertia',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Jetstream Route Middleware
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify which middleware Jetstream will assign to the routes
+ | that it registers with the application. When necessary, you may modify
+ | these middleware; however, this default value is usually sufficient.
+ |
+ */
+
+ 'middleware' => ['web'],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Jetstream Guard
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the authentication guard Jetstream will use while
+ | authenticating users. This value should correspond with one of your
+ | guards that is already present in your "auth" configuration file.
+ |
+ */
+
+ 'guard' => 'sanctum',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Features
+ |--------------------------------------------------------------------------
+ |
+ | Some of Jetstream's features are optional. You may disable the features
+ | by removing them from this array. You're free to only remove some of
+ | these features or you can even remove all of these if you need to.
+ |
+ */
+
+ 'features' => [
+ // Features::termsAndPrivacyPolicy(),
+ // Features::profilePhotos(),
+ // Features::api(),
+ // Features::teams(['invitations' => true]),
+ Features::accountDeletion(),
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Profile Photo Disk
+ |--------------------------------------------------------------------------
+ |
+ | This configuration value determines the default disk that will be used
+ | when storing profile photos for your application's users. Typically
+ | this will be the "public" disk but you may adjust this if needed.
+ |
+ */
+
+ 'profile_photo_disk' => 'public',
+
+];
diff --git a/stubs/inertia/resources/js/Jetstream/ConfirmationModal.vue b/stubs/inertia/resources/js/Jetstream/ConfirmationModal.vue
index 2e18af44c..df982c792 100644
--- a/stubs/inertia/resources/js/Jetstream/ConfirmationModal.vue
+++ b/stubs/inertia/resources/js/Jetstream/ConfirmationModal.vue
@@ -20,7 +20,7 @@
-
+
diff --git a/stubs/inertia/resources/js/Jetstream/ConfirmsPassword.vue b/stubs/inertia/resources/js/Jetstream/ConfirmsPassword.vue
index 6415b1edc..f646be896 100644
--- a/stubs/inertia/resources/js/Jetstream/ConfirmsPassword.vue
+++ b/stubs/inertia/resources/js/Jetstream/ConfirmsPassword.vue
@@ -27,7 +27,7 @@
Cancel
-
+
{{ button }}
diff --git a/stubs/inertia/resources/js/Pages/API/Partials/ApiTokenManager.vue b/stubs/inertia/resources/js/Pages/API/Partials/ApiTokenManager.vue
index 01813e45d..6aad636ba 100644
--- a/stubs/inertia/resources/js/Pages/API/Partials/ApiTokenManager.vue
+++ b/stubs/inertia/resources/js/Pages/API/Partials/ApiTokenManager.vue
@@ -134,7 +134,7 @@
Cancel
-
+
Save
@@ -155,7 +155,7 @@
Cancel
-
+
Delete
diff --git a/stubs/inertia/resources/js/Pages/Profile/Partials/DeleteUserForm.vue b/stubs/inertia/resources/js/Pages/Profile/Partials/DeleteUserForm.vue
index 606201710..c0242299d 100644
--- a/stubs/inertia/resources/js/Pages/Profile/Partials/DeleteUserForm.vue
+++ b/stubs/inertia/resources/js/Pages/Profile/Partials/DeleteUserForm.vue
@@ -43,7 +43,7 @@
Cancel
-
+
Delete Account
diff --git a/stubs/inertia/resources/js/Pages/Profile/Partials/LogoutOtherBrowserSessionsForm.vue b/stubs/inertia/resources/js/Pages/Profile/Partials/LogoutOtherBrowserSessionsForm.vue
index ed181b46a..18b64060e 100644
--- a/stubs/inertia/resources/js/Pages/Profile/Partials/LogoutOtherBrowserSessionsForm.vue
+++ b/stubs/inertia/resources/js/Pages/Profile/Partials/LogoutOtherBrowserSessionsForm.vue
@@ -28,7 +28,7 @@
- {{ session.agent.platform }} - {{ session.agent.browser }}
+ {{ session.agent.platform ? session.agent.platform : 'Unknown' }} - {{ session.agent.browser ? session.agent.browser : 'Unknown' }}
@@ -77,7 +77,7 @@
Cancel
-
+
Log Out Other Browser Sessions
diff --git a/stubs/inertia/resources/js/Pages/Teams/Partials/DeleteTeamForm.vue b/stubs/inertia/resources/js/Pages/Teams/Partials/DeleteTeamForm.vue
index 52736955d..087e737d0 100644
--- a/stubs/inertia/resources/js/Pages/Teams/Partials/DeleteTeamForm.vue
+++ b/stubs/inertia/resources/js/Pages/Teams/Partials/DeleteTeamForm.vue
@@ -34,7 +34,7 @@
Cancel
-
+
Delete Team
diff --git a/stubs/inertia/resources/js/Pages/Teams/Partials/TeamMemberManager.vue b/stubs/inertia/resources/js/Pages/Teams/Partials/TeamMemberManager.vue
index 9270dfe6c..3989b5766 100644
--- a/stubs/inertia/resources/js/Pages/Teams/Partials/TeamMemberManager.vue
+++ b/stubs/inertia/resources/js/Pages/Teams/Partials/TeamMemberManager.vue
@@ -196,7 +196,7 @@
Cancel
-
+
Save
@@ -217,7 +217,7 @@
Cancel
-
+
Leave
@@ -238,7 +238,7 @@
Cancel
-
+
Remove
diff --git a/stubs/livewire/resources/views/api/api-token-manager.blade.php b/stubs/livewire/resources/views/api/api-token-manager.blade.php
index 2e7132ff6..1391fb70c 100644
--- a/stubs/livewire/resources/views/api/api-token-manager.blade.php
+++ b/stubs/livewire/resources/views/api/api-token-manager.blade.php
@@ -140,7 +140,7 @@ class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full
{{ __('Cancel') }}
-
+
{{ __('Save') }}
@@ -161,7 +161,7 @@ class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full
{{ __('Cancel') }}
-
+
{{ __('Delete') }}
diff --git a/stubs/livewire/resources/views/profile/delete-user-form.blade.php b/stubs/livewire/resources/views/profile/delete-user-form.blade.php
index 280819c0e..3acdb30d6 100644
--- a/stubs/livewire/resources/views/profile/delete-user-form.blade.php
+++ b/stubs/livewire/resources/views/profile/delete-user-form.blade.php
@@ -43,7 +43,7 @@
{{ __('Cancel') }}
-
+
{{ __('Delete Account') }}
diff --git a/stubs/livewire/resources/views/profile/logout-other-browser-sessions-form.blade.php b/stubs/livewire/resources/views/profile/logout-other-browser-sessions-form.blade.php
index 8754f79e7..c20b46516 100644
--- a/stubs/livewire/resources/views/profile/logout-other-browser-sessions-form.blade.php
+++ b/stubs/livewire/resources/views/profile/logout-other-browser-sessions-form.blade.php
@@ -31,7 +31,7 @@
- {{ $session->agent->platform() }} - {{ $session->agent->browser() }}
+ {{ $session->agent->platform() ? $session->agent->platform() : 'Unknown' }} - {{ $session->agent->browser() ? $session->agent->browser() : 'Unknown' }}
@@ -86,7 +86,7 @@
{{ __('Cancel') }}
-
{{ __('Log Out Other Browser Sessions') }}
diff --git a/stubs/livewire/resources/views/teams/delete-team-form.blade.php b/stubs/livewire/resources/views/teams/delete-team-form.blade.php
index 32a9f2153..49a2d7d13 100644
--- a/stubs/livewire/resources/views/teams/delete-team-form.blade.php
+++ b/stubs/livewire/resources/views/teams/delete-team-form.blade.php
@@ -33,7 +33,7 @@
{{ __('Cancel') }}
-
+
{{ __('Delete Team') }}
diff --git a/stubs/livewire/resources/views/teams/team-member-manager.blade.php b/stubs/livewire/resources/views/teams/team-member-manager.blade.php
index 876732fcf..3594dc61d 100644
--- a/stubs/livewire/resources/views/teams/team-member-manager.blade.php
+++ b/stubs/livewire/resources/views/teams/team-member-manager.blade.php
@@ -206,7 +206,7 @@
{{ __('Cancel') }}
-
+
{{ __('Save') }}
@@ -227,7 +227,7 @@
{{ __('Cancel') }}
-
+
{{ __('Leave') }}
@@ -248,7 +248,7 @@
{{ __('Cancel') }}
-
+
{{ __('Remove') }}
diff --git a/stubs/tests/EmailVerificationTest.php b/stubs/tests/EmailVerificationTest.php
index 0b4ce1992..f240e124c 100644
--- a/stubs/tests/EmailVerificationTest.php
+++ b/stubs/tests/EmailVerificationTest.php
@@ -21,9 +21,7 @@ public function test_email_verification_screen_can_be_rendered()
return $this->markTestSkipped('Email verification not enabled.');
}
- $user = User::factory()->withPersonalTeam()->create([
- 'email_verified_at' => null,
- ]);
+ $user = User::factory()->withPersonalTeam()->unverified()->create();
$response = $this->actingAs($user)->get('/email/verify');
@@ -38,9 +36,7 @@ public function test_email_can_be_verified()
Event::fake();
- $user = User::factory()->create([
- 'email_verified_at' => null,
- ]);
+ $user = User::factory()->unverified()->create();
$verificationUrl = URL::temporarySignedRoute(
'verification.verify',
@@ -62,9 +58,7 @@ public function test_email_can_not_verified_with_invalid_hash()
return $this->markTestSkipped('Email verification not enabled.');
}
- $user = User::factory()->create([
- 'email_verified_at' => null,
- ]);
+ $user = User::factory()->unverified()->create();
$verificationUrl = URL::temporarySignedRoute(
'verification.verify',
diff --git a/stubs/tests/PasswordConfirmationTest.php b/stubs/tests/PasswordConfirmationTest.php
index 6bb50c596..a31fbab92 100644
--- a/stubs/tests/PasswordConfirmationTest.php
+++ b/stubs/tests/PasswordConfirmationTest.php
@@ -13,9 +13,7 @@ class PasswordConfirmationTest extends TestCase
public function test_confirm_password_screen_can_be_rendered()
{
- $user = Features::hasTeamFeatures()
- ? User::factory()->withPersonalTeam()->create()
- : User::factory()->create();
+ $user = User::factory()->withPersonalTeam()->create();
$response = $this->actingAs($user)->get('/user/confirm-password');
diff --git a/stubs/tests/inertia/ApiTokenPermissionsTest.php b/stubs/tests/inertia/ApiTokenPermissionsTest.php
index 679ef55b4..d086e74be 100644
--- a/stubs/tests/inertia/ApiTokenPermissionsTest.php
+++ b/stubs/tests/inertia/ApiTokenPermissionsTest.php
@@ -18,11 +18,7 @@ public function test_api_token_permissions_can_be_updated()
return $this->markTestSkipped('API support is not enabled.');
}
- if (Features::hasTeamFeatures()) {
- $this->actingAs($user = User::factory()->withPersonalTeam()->create());
- } else {
- $this->actingAs($user = User::factory()->create());
- }
+ $this->actingAs($user = User::factory()->withPersonalTeam()->create());
$token = $user->tokens()->create([
'name' => 'Test Token',
diff --git a/stubs/tests/inertia/CreateApiTokenTest.php b/stubs/tests/inertia/CreateApiTokenTest.php
index 1c4168b1d..11846fad0 100644
--- a/stubs/tests/inertia/CreateApiTokenTest.php
+++ b/stubs/tests/inertia/CreateApiTokenTest.php
@@ -17,11 +17,7 @@ public function test_api_tokens_can_be_created()
return $this->markTestSkipped('API support is not enabled.');
}
- if (Features::hasTeamFeatures()) {
- $this->actingAs($user = User::factory()->withPersonalTeam()->create());
- } else {
- $this->actingAs($user = User::factory()->create());
- }
+ $this->actingAs($user = User::factory()->withPersonalTeam()->create());
$response = $this->post('/user/api-tokens', [
'name' => 'Test Token',
diff --git a/stubs/tests/inertia/DeleteApiTokenTest.php b/stubs/tests/inertia/DeleteApiTokenTest.php
index db6800aae..a21b48f42 100644
--- a/stubs/tests/inertia/DeleteApiTokenTest.php
+++ b/stubs/tests/inertia/DeleteApiTokenTest.php
@@ -18,11 +18,7 @@ public function test_api_tokens_can_be_deleted()
return $this->markTestSkipped('API support is not enabled.');
}
- if (Features::hasTeamFeatures()) {
- $this->actingAs($user = User::factory()->withPersonalTeam()->create());
- } else {
- $this->actingAs($user = User::factory()->create());
- }
+ $this->actingAs($user = User::factory()->withPersonalTeam()->create());
$token = $user->tokens()->create([
'name' => 'Test Token',
diff --git a/stubs/tests/livewire/ApiTokenPermissionsTest.php b/stubs/tests/livewire/ApiTokenPermissionsTest.php
index 829b42258..5fbd9091e 100644
--- a/stubs/tests/livewire/ApiTokenPermissionsTest.php
+++ b/stubs/tests/livewire/ApiTokenPermissionsTest.php
@@ -20,11 +20,7 @@ public function test_api_token_permissions_can_be_updated()
return $this->markTestSkipped('API support is not enabled.');
}
- if (Features::hasTeamFeatures()) {
- $this->actingAs($user = User::factory()->withPersonalTeam()->create());
- } else {
- $this->actingAs($user = User::factory()->create());
- }
+ $this->actingAs($user = User::factory()->withPersonalTeam()->create());
$token = $user->tokens()->create([
'name' => 'Test Token',
diff --git a/stubs/tests/livewire/CreateApiTokenTest.php b/stubs/tests/livewire/CreateApiTokenTest.php
index e0834fa3a..465ea387e 100644
--- a/stubs/tests/livewire/CreateApiTokenTest.php
+++ b/stubs/tests/livewire/CreateApiTokenTest.php
@@ -19,11 +19,7 @@ public function test_api_tokens_can_be_created()
return $this->markTestSkipped('API support is not enabled.');
}
- if (Features::hasTeamFeatures()) {
- $this->actingAs($user = User::factory()->withPersonalTeam()->create());
- } else {
- $this->actingAs($user = User::factory()->create());
- }
+ $this->actingAs($user = User::factory()->withPersonalTeam()->create());
Livewire::test(ApiTokenManager::class)
->set(['createApiTokenForm' => [
diff --git a/stubs/tests/livewire/DeleteApiTokenTest.php b/stubs/tests/livewire/DeleteApiTokenTest.php
index a8844c040..9128862f0 100644
--- a/stubs/tests/livewire/DeleteApiTokenTest.php
+++ b/stubs/tests/livewire/DeleteApiTokenTest.php
@@ -20,11 +20,7 @@ public function test_api_tokens_can_be_deleted()
return $this->markTestSkipped('API support is not enabled.');
}
- if (Features::hasTeamFeatures()) {
- $this->actingAs($user = User::factory()->withPersonalTeam()->create());
- } else {
- $this->actingAs($user = User::factory()->create());
- }
+ $this->actingAs($user = User::factory()->withPersonalTeam()->create());
$token = $user->tokens()->create([
'name' => 'Test Token',