Skip to content

Commit 5d2ab01

Browse files
committed
Remove deprecated classes, methods and class constants
1 parent 9b22603 commit 5d2ab01

File tree

7 files changed

+9
-164
lines changed

7 files changed

+9
-164
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ If it saves you or your team time, please consider [sponsoring its development](
99

1010
* [Firebase Dynamic Links was shut down on August 25th, 2025](https://firebase.google.com/support/dynamic-links-faq)
1111
and has been removed from the SDK.
12+
* Deprecated classes, methods and class constants have been removed.
1213

1314
See **[UPGRADE-8.0](UPGRADE-8.0.md) for more details on the changes between 7.x and 8.0.**
1415

UPGRADE-8.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,13 @@ The following list has been generated with [roave/backward-compatibility-check](
3232
[BC] REMOVED: Class Kreait\Firebase\DynamicLink\ShortenLongDynamicLink has been deleted
3333
[BC] REMOVED: Class Kreait\Firebase\DynamicLink\ShortenLongDynamicLink\FailedToShortenLongDynamicLink has been deleted
3434
[BC] REMOVED: Class Kreait\Firebase\DynamicLink\SocialMetaTagInfo has been deleted
35+
[BC] REMOVED: Class Kreait\Firebase\RemoteConfig\ExplicitValue has been deleted
36+
[BC] REMOVED: Constant Kreait\Firebase\Contract\Messaging::BATCH_MESSAGE_LIMIT was removed
3537
[BC] REMOVED: Method Kreait\Firebase\Factory#createDynamicLinksService() was removed
38+
[BC] REMOVED: Method Kreait\Firebase\Factory#getDebugInfo() was removed
39+
[BC] REMOVED: Method Kreait\Firebase\Factory#withFirestoreDatabase() was removed
40+
[BC] REMOVED: Method Kreait\Firebase\Messaging\CloudMessage#hasTarget() was removed
41+
[BC] REMOVED: Method Kreait\Firebase\Messaging\CloudMessage#target() was removed
42+
[BC] REMOVED: Method Kreait\Firebase\Messaging\CloudMessage#withChangedTarget() was removed
43+
[BC] REMOVED: Method Kreait\Firebase\Messaging\CloudMessage::withTarget() was removed
3644
```

src/Firebase/Contract/Messaging.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
*/
2323
interface Messaging
2424
{
25-
/**
26-
* @deprecated 7.5.0
27-
*/
28-
public const BATCH_MESSAGE_LIMIT = 500;
29-
3025
/**
3126
* @param Message|MessageInputShape $message
3227
*

src/Firebase/Factory.php

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,6 @@ public function withDatabaseAuthVariableOverride(?array $override): self
222222
return $factory;
223223
}
224224

225-
/**
226-
* @deprecated 7.19.0 Use `createFirestore($database)` instead
227-
* @see createFirestore()
228-
*
229-
* @param non-empty-string $database
230-
*/
231-
public function withFirestoreDatabase(string $database): self
232-
{
233-
return $this->withFirestoreClientConfig(['database' => $database]);
234-
}
235-
236225
/**
237226
* @param array<non-empty-string, mixed> $config
238227
*/
@@ -505,48 +494,6 @@ public function createStorage(): Contract\Storage
505494
return new Storage($storageClient, $this->getStorageBucketName());
506495
}
507496

508-
/**
509-
* @deprecated 7.20.0
510-
* @codeCoverageIgnore
511-
*
512-
* @return array<mixed>
513-
*/
514-
public function getDebugInfo(): array
515-
{
516-
try {
517-
$projectId = $this->getProjectId();
518-
} catch (Throwable $e) {
519-
$projectId = $e->getMessage();
520-
}
521-
522-
try {
523-
$credentials = $this->getGoogleAuthTokenCredentials();
524-
525-
if ($credentials !== null) {
526-
$credentials = $credentials::class;
527-
}
528-
} catch (Throwable $e) {
529-
$credentials = $e->getMessage();
530-
}
531-
532-
try {
533-
$databaseUrl = $this->getDatabaseUrl();
534-
} catch (Throwable $e) {
535-
$databaseUrl = $e->getMessage();
536-
}
537-
538-
return [
539-
'credentialsType' => $credentials,
540-
'databaseUrl' => $databaseUrl,
541-
'defaultStorageBucket' => $this->defaultStorageBucket,
542-
'projectId' => $projectId,
543-
'serviceAccount' => $this->getServiceAccount(),
544-
'tenantId' => $this->tenantId,
545-
'tokenCacheType' => $this->authTokenCache !== null ? $this->authTokenCache::class : $this->defaultCache::class,
546-
'verifierCacheType' => $this->verifierCache !== null ? $this->verifierCache::class : $this->defaultCache::class,
547-
];
548-
}
549-
550497
/**
551498
* @param array<non-empty-string, mixed>|null $config
552499
* @param array<callable(callable): callable>|null $middlewares

src/Firebase/Messaging/CloudMessage.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ private function __construct(
5151
$this->fcmOptions = FcmOptions::fromArray([]);
5252
}
5353

54-
/**
55-
* @deprecated 7.16.0 Use `CloudMessage::new()` and one of `toToken()`, `toTopic()`, or `toCondition()` instead.
56-
*
57-
* @param MessageTarget::CONDITION|MessageTarget::TOKEN|MessageTarget::TOPIC|MessageTarget::UNKNOWN $type
58-
* @param non-empty-string $value
59-
*/
60-
public static function withTarget(string $type, string $value): self
61-
{
62-
return new self(MessageTarget::with($type, $value));
63-
}
64-
6554
public static function new(): self
6655
{
6756
return new self(MessageTarget::with(MessageTarget::UNKNOWN, 'unknown'));
@@ -114,22 +103,6 @@ public static function fromArray(array $data): self
114103
return $new;
115104
}
116105

117-
/**
118-
* @deprecated 7.16.0 Use one of `toToken()`, `toTopic()`, or `toCondition()` instead.
119-
*
120-
* @param MessageTarget::CONDITION|MessageTarget::TOKEN|MessageTarget::TOPIC|MessageTarget::UNKNOWN $type
121-
* @param non-empty-string $value
122-
*
123-
* @throws InvalidArgumentException if the target type or value is invalid
124-
*/
125-
public function withChangedTarget(string $type, string $value): self
126-
{
127-
$new = clone $this;
128-
$new->target = MessageTarget::with($type, $value);
129-
130-
return $new;
131-
}
132-
133106
/**
134107
* @param MessageData|array<non-empty-string, Stringable|string> $data
135108
*
@@ -269,22 +242,6 @@ public function toCondition(string $condition): self
269242
return $new;
270243
}
271244

272-
/**
273-
* @deprecated 7.16.0
274-
*/
275-
public function hasTarget(): bool
276-
{
277-
return $this->target->type() !== MessageTarget::UNKNOWN;
278-
}
279-
280-
/**
281-
* @deprecated 7.16.0
282-
*/
283-
public function target(): MessageTarget
284-
{
285-
return $this->target;
286-
}
287-
288245
public function jsonSerialize(): array
289246
{
290247
$data = [

src/Firebase/RemoteConfig/ExplicitValue.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/Integration/Factory/FirestoreTest.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,6 @@ public function itCanConnectToACustomDatabase(): void
7777
}
7878
}
7979

80-
/**
81-
* @deprecated 7.19.0
82-
*/
83-
#[Test]
84-
public function itSupportsOverridingTheDefaultFirestoreDatabase(): void
85-
{
86-
$collection = __FUNCTION__;
87-
$documentName = __FUNCTION__.self::randomString();
88-
89-
$database = self::$factory->withFirestoreDatabase($this->customDBName())->createFirestore()->database();
90-
91-
try {
92-
$database->collection($collection)->document($documentName)->create();
93-
$this->assertTrue($database->collection($collection)->document($documentName)->snapshot()->exists());
94-
} finally {
95-
$database->collection($collection)->document($documentName)->delete();
96-
}
97-
}
98-
9980
#[Test]
10081
public function itSupportsAdditionalFirestoreConfig(): void
10182
{

0 commit comments

Comments
 (0)