๐Ÿ‘จโ€๐Ÿ’ป
Socialstream
  • Introduction
  • โฎ๏ธPrologue
    • Release Notes
    • Upgrade Guide
      • Upgrading to v6 from 5.x
      • Upgrading to v5 from 4.x
      • Upgrading to v4 from 3.x
      • Upgrading to v3 from 2.x
      • Upgrading to v2 from 1.x
    • Contribution Guide
  • ๐Ÿ”‘Getting Started
    • Installation
    • Configuration
    • Customization
      • Socialite Redirect
      • Resolving Users
      • Handling Invalid State
      • Handling OAuth Errors
      • Authenticating Users
  • ๐Ÿš€Features
    • Remember Session
    • Refresh Expired Tokens
    • Provider Avatars
    • Global Login
    • Register from Login
    • Missing Emails
    • Auth Existing Unlinked Users
    • Login on Registration (deprecated)
  • ๐Ÿงพguides
    • Standalone Installation
    • Filament with Jetstream
    • Filament with Breeze
    • Laravel Passport
    • Socialite Providers
    • Overriding Fortify's Authentication
  • ๐Ÿ”—Links
    • View Code On GitHub
    • About Me
    • Contribute
    • Donate
Powered by GitBook
On this page
  • Overview
  • Changes
  • Native Type declarations
  • User Profile Photo
  • Inertia Props

Was this helpful?

  1. Prologue
  2. Upgrade Guide

Upgrading to v4 from 3.x

PreviousUpgrading to v5 from 4.xNextUpgrading to v3 from 2.x

Last updated 1 year ago

Was this helpful?

This upgrade guide only discusses upgrading Socialstream 4.x and assumes you are upgrading from an unaltered 3.x install. Upgrading Jetstream, Livewire, Inertia, Vue or Tailwind CSS is out of scope for this documentation. Please consult the upgrade guides for each of these packages instead.

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" />
โฎ๏ธ
Changes
Native Type Declarations
User Profile Photo
Inertia Props