This major release introduces significant changes designed to streamline the usage of FilamentCompanies. Here’s how to migrate your project from 3.x to 4.x.
-
Removal of Classes:
Wallo\FilamentCompanies\Features
Wallo\FilamentCompanies\Providers
Wallo\FilamentCompanies\Socialite
-
Introduction of Enums:
- Functionality previously available through the
Providers
class has been replaced by theWallo\FilamentCompanies\Enums\Provider
enum. - Some functionality previously available through the
Socialite
class has been replaced by theWallo\FilamentCompanies\Enums\Feature
enum.
- Functionality previously available through the
-
Removal of the
MakeUserCommand
command.- It isn't necessary and was removed to simplify the package.
You should first make sure you follow the Laravel 11 Upgrade Guide and then upgrade your andrewdwallo/filament-companies
dependency to ^4.0
within your application's composer.json
file. Then, run the composer update
command:
composer update
For Socialite providers, replace the usage of the Wallo\FilamentCompanies\Providers
class with the Wallo\FilamentCompanies\Enums\Provider
enum.
Before:
use Wallo\FilamentCompanies\Providers;
// Enable the following Socialite providers.
Providers::github(),
// And so on for the other providers...
// Determine if the following Socialite providers are enabled.
Providers::hasGithub(),
// And so on for the other providers...
After:
use Wallo\FilamentCompanies\Enums\Provider;
// Enable the following Socialite providers.
Provider::Github,
// And so on for the other providers...
// Determine if the following Socialite providers are enabled.
Provider::Github->isEnabled(),
// And so on for the other providers...
For Socialite features, replace the usage of the Wallo\FilamentCompanies\Socialite
class with the Wallo\FilamentCompanies\Enums\Feature
enum.
Before:
use Wallo\FilamentCompanies\Socialite;
// Enable the following features.
Socialite::rememberSession(),
// And so on for the other features...
// Determine if the following features are enabled.
Socialite::hasRememberSessionFeature(),
// And so on for the other features...
After:
use Wallo\FilamentCompanies\Enums\Feature;
// Enable the following features.
Feature::RememberSession,
// And so on for the other features...
// Determine if the following features are enabled.
Feature::RememberSession->isEnabled(),
// And so on for the other features...
The rest of the methods previously available in the
Socialite
andFeatures
classes are still available and were moved to the mainWallo\FilamentCompanies\FilamentCompanies
class.
Should you encounter any issues during the upgrade process, please don’t hesitate to reach out Discord or by creating a new Discussion on GitHub.