From 0247814995c6939ca8dd23fa2b1d7e06f5ce617b Mon Sep 17 00:00:00 2001 From: Alessio Date: Wed, 19 Jan 2022 11:35:58 +0100 Subject: [PATCH 1/2] Remove dependency on legacy laravel/ui package It was used to get the RedirectsUsers trait --- composer.json | 3 +-- src/Auth/AuthenticatesUsersWithIdentity.php | 1 - src/Auth/ConnectUserIdentity.php | 1 - src/Auth/RedirectsUsers.php | 24 +++++++++++++++++++++ src/Auth/RegistersUsersWithIdentity.php | 1 - 5 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 src/Auth/RedirectsUsers.php diff --git a/composer.json b/composer.json index 19b8042..7ff0083 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,7 @@ "illuminate/view": "^8.0", "laravel/socialite": "^5.0", "socialiteproviders/gitlab": "^3.1|^4.0", - "socialiteproviders/dropbox": "^4.1", - "laravel/ui": "^3.0" + "socialiteproviders/dropbox": "^4.1" }, "require-dev": { "fzaninotto/faker": "~1.9.1", diff --git a/src/Auth/AuthenticatesUsersWithIdentity.php b/src/Auth/AuthenticatesUsersWithIdentity.php index eee016c..f6deeae 100644 --- a/src/Auth/AuthenticatesUsersWithIdentity.php +++ b/src/Auth/AuthenticatesUsersWithIdentity.php @@ -5,7 +5,6 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; -use Illuminate\Foundation\Auth\RedirectsUsers; use Illuminate\Validation\ValidationException; use Oneofftech\Identities\Facades\Identity; use Oneofftech\Identities\Support\FindIdentity; diff --git a/src/Auth/ConnectUserIdentity.php b/src/Auth/ConnectUserIdentity.php index ae65b4f..08108a5 100644 --- a/src/Auth/ConnectUserIdentity.php +++ b/src/Auth/ConnectUserIdentity.php @@ -5,7 +5,6 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; -use Illuminate\Foundation\Auth\RedirectsUsers; use Illuminate\Support\Facades\DB; use Oneofftech\Identities\Facades\IdentityCrypt; use Oneofftech\Identities\Facades\Identity; diff --git a/src/Auth/RedirectsUsers.php b/src/Auth/RedirectsUsers.php new file mode 100644 index 0000000..1e5b210 --- /dev/null +++ b/src/Auth/RedirectsUsers.php @@ -0,0 +1,24 @@ +redirectTo(); + } + + return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home'; + } +} \ No newline at end of file diff --git a/src/Auth/RegistersUsersWithIdentity.php b/src/Auth/RegistersUsersWithIdentity.php index 3c23ebe..40bcf78 100644 --- a/src/Auth/RegistersUsersWithIdentity.php +++ b/src/Auth/RegistersUsersWithIdentity.php @@ -6,7 +6,6 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; -use Illuminate\Foundation\Auth\RedirectsUsers; use Illuminate\Support\Arr; use Illuminate\Support\Facades\DB; use Oneofftech\Identities\Facades\IdentityCrypt; From 52b3e586eccbbcc1c4feeeb85a03dac6e9ab1f83 Mon Sep 17 00:00:00 2001 From: Alessio Date: Wed, 19 Jan 2022 11:37:20 +0100 Subject: [PATCH 2/2] Code style --- src/Auth/RedirectsUsers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth/RedirectsUsers.php b/src/Auth/RedirectsUsers.php index 1e5b210..dcf4684 100644 --- a/src/Auth/RedirectsUsers.php +++ b/src/Auth/RedirectsUsers.php @@ -21,4 +21,4 @@ public function redirectPath() return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home'; } -} \ No newline at end of file +}