Upgrading to v5 from 4.x
Last updated
Was this helpful?
Last updated
Was this helpful?
socialstream:upgrade
Upgrading Socialstream has never been easier. With 5.0
we have created an artisan command that will guide you through all the changes you need to make. Simply execute the following command:
You may then follow the on-screen instructions to complete the upgrade to Socialstream 5.0.
Impact: High
Socialstream v5.0 removes laravel/jetstream
as a dependency due to adding support for multiple stater kit options. Before upgrading, you should ensure that jetstream is added to the require
dependencies your composer.json
file. You can do this by executing the following command:
Impact: High
v5 applies a patch to rename all incorrect instances of "Oauth" with "OAuth". Please make sure you have updated any usages to also match this change.
Socialstream::refresesOauthTokens
MethodImpact: High
This method has been renamed to fix the typo, if you are using the method, please update it to refreshesOAuthTokens
.
Socialstream
ComponentImpact: Medium
The main Socialstream
component has been updated, you should replace it's contents with the one found on GitHub for your chosen Jetstream stack:
Impact: Medium
The new default installation for Socialstream moves the logic for showing a providers icon to it's own component for each stack. It is recommended that you copy this logic over for your stack and update your existing Socialstream installation to reference the new component:
Livewire
Replace any @if
, @elseif
and @else
directive calls that are used to determine what icons are shown with:
Socialstream::providers
MethodImpact: High
The Socialstream::providers
method now returns an array of arrays for each registered provider. The data structure for providers is built using JoelButcher\Socialstream\Data\ProviderData::toArray
and looks like the following example:
Add a new provider-icon.blade.php
Component
Changes to connected-account.blade.php
You should also update your applications connected-accounts-form.blade.php
to reflect the change to the $provider
array:
Add a new ProviderIcon.vue
Component
Changes to ConnectedAccount.vue
Changes to Auth Views
Both Login.vue
and Register.vue
have been updated to pass properties from $page.props.socialstream
into the updated Socialstream.vue
component. Please make sure to review these changes and update your application accordingly.
Changes to ConnectedAccountsForm.vue
component
HandlesInvalidState::handle
methodThe HandlesInvalidState
contract has been updated to remove the $callback
parameter, this parameter was never used by Socialstream or called in anyway. You should update your implementations to also remove this parameter.
Create a new provider-icon.blade.php
within resources/views/components/socialstream-icons
inside your Laravel Application and add the contents from , making sure to cater for any additional icons you may have added.
This new component is a switch-case around the $provider['id']
property and used to determine which icon should be shown. You should place this component within the resources/views/components/socialstream-icons
directory of your Laravel application. The source code can be found .
This component is referenced within and the .
Socialstream 5.0
updates the connected-account
component to use the new provider array. You should update your version of this component to match the source code's .
Socialstream 5.0 adds a new ProviderIcon.vue
component. You will want to add this component from and ensure any additional provider icons you have created are catered for.
This component is referenced within and .
The connected account component has been updated to reflect the changes made to the Socialstream::providers
method. As a result, existing installations of this component will now break. You will want to make sure that your ConnectedAccount.vue
component is updated to align with the .
A lot of the logic in this component has been updated to align with the changes made to Socialstream::providers
, you may wish to review the and update your version of the component to ensure compatibility.