Skip to content

Commit b5c4002

Browse files
author
Marijus Kilmanas
committed
Extract new function into a separate interface for BC
1 parent 9c7f5c6 commit b5c4002

3 files changed

Lines changed: 25 additions & 10 deletions

File tree

src/Firebase/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
/**
6060
* @internal
6161
*/
62-
final class Auth implements Contract\Auth
62+
final class Auth implements Contract\Auth, Contract\Transitional\FederatedUserFetcher
6363
{
6464
private readonly Parser $jwtParser;
6565

src/Firebase/Contract/Auth.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,6 @@ public function getUserByEmail(Stringable|string $email): UserRecord;
125125
*/
126126
public function getUserByPhoneNumber(Stringable|string $phoneNumber): UserRecord;
127127

128-
/**
129-
* @param Stringable|non-empty-string $providerId
130-
* @param Stringable|non-empty-string $providerUid
131-
*
132-
* @throws Exception\AuthException
133-
* @throws Exception\FirebaseException
134-
*/
135-
public function getUserByProviderUid(Stringable|string $providerId, Stringable|string $providerUid): UserRecord;
136-
137128
/**
138129
* @throws Exception\AuthException
139130
* @throws Exception\FirebaseException
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Kreait\Firebase\Contract\Transitional;
6+
7+
use Kreait\Firebase\Auth\UserRecord;
8+
use Kreait\Firebase\Exception;
9+
use Stringable;
10+
11+
/**
12+
* @TODO: This interface is intended to be integrated into the Auth interface on the next major release.
13+
*/
14+
interface FederatedUserFetcher
15+
{
16+
/**
17+
* @param Stringable|non-empty-string $providerId
18+
* @param Stringable|non-empty-string $providerUid
19+
*
20+
* @throws Exception\AuthException
21+
* @throws Exception\FirebaseException
22+
*/
23+
public function getUserByProviderUid(Stringable|string $providerId, Stringable|string $providerUid): UserRecord;
24+
}

0 commit comments

Comments
 (0)