Upgrading to v4 from 3.x
Overview
Changes
Native Type declarations
Impact: High
Version 4.x updates the interfaces and published php
files to use native type declarations. Please ensure the following files have been updated to match their interface counterparts:
CreateConnectedAccount.php
CreateUserFromProvider.php
HandleInvalidState.php
ResolveSocialiteUser.php
SetUserPassword.php
UpdateConnectedAccount.php
User Profile Photo
Impact: High
If you have included the HasProfilePhoto
trait in your user model, please update your model to the following:
use HasProfilePhoto {
- getProfilePhotoUrlAttribute as getPhotoUrl;
+ HasProfilePhoto::profilePhotoUrl as getPhotoUrl;
}
And replace the getProfilePhotoUrlAttribute
method in the model with:
/**
* Get the URL to the user's profile photo.
*/
public function profilePhotoUrl(): Attribute
{
return filter_var($this->profile_photo_path, FILTER_VALIDATE_URL)
? Attribute::get(fn () => $this->profile_photo_path)
: $this->getPhotoUrl();
}
Inertia Props
Impact: High
If you're using Inertia, please update your Profile/Show.vue
file to the following:
-29: <UpdateProfileInformationForm :user="$page.props.user" />
+29: <UpdateProfileInformationForm :user="$page.props.auth.user" />
Last updated
Was this helpful?