You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+14
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
5
6
6
## [Unreleased]
7
+
### Added
8
+
- Compatibility with FCM HTTP v1 API.
9
+
10
+
### Changed
11
+
- Signature of the `\ErickSkrauch\Fcm\Client` class now requires the `projectId` param.
12
+
- The return type of the `\ErickSkrauch\Fcm\Client::send()` method is changed to `string`.
13
+
-`\ErickSkrauch\Fcm\Client::send()` now throws `\ErickSkrauch\Fcm\Exception\ErrorResponseException`.
14
+
15
+
### Removed
16
+
-`ErickSkrauch\Fcm\Recipient\MultipleDevices` and `ErickSkrauch\Fcm\Recipient\MultipleTopics` recipients. Iterate over per-device or per-topic to archive the same behavior.
17
+
-`ErickSkrauch\Fcm\Response\SendResponse`.
18
+
19
+
### Fixed
20
+
- Deprecation error with nullable arguments for PHP 8.4.
$recipient = new Device('your-device-token'); // or new ErickSkrauch\Fcm\Recipient\Topic('topic');
48
48
49
49
$result = $client->send($message, $recipient);
50
50
```
51
51
52
-
The library provides several implementations for the `Recipient` interface:
53
-
*`Device` is used to send notifications to a single device.
54
-
*`Topic` is used to send notifications to a single topic.
55
-
*`MultipleDevices` is used to send notifications to multiple devices. The FCM documentation doesn't recommend using this method to send to 1 device.
56
-
*`MultipleTopics` is used to send notifications to multiple topics combined by the operator `||`.
57
-
58
-
At the moment, the library does not have a builder for complex conditions. But you can always create your own implementation of the `Recipient` interface:
59
-
60
-
```php
61
-
use ErickSkrauch\Fcm\Recipient\Recipient;
62
-
63
-
class MyComplexCondition implements Recipient {
64
-
65
-
public function getConditionParam(): string{
66
-
return Recipient::PARAM_CONDITION;
67
-
}
68
-
69
-
public function getConditionValue(): string {
70
-
return "'TopicA' in topics && ('TopicB' in topics || 'TopicC' in topics)";
71
-
}
72
-
73
-
}
74
-
```
75
-
76
52
## Contribute
77
53
78
54
This library in an Open Source under the MIT license. It is, thus, maintained by collaborators and contributors.
* @param string $oauthToken you must generate the JWT key for your service account with a scope "https://www.googleapis.com/auth/firebase.messaging"
30
+
* @param string $projectId you can find the project's ID here: https://console.firebase.google.com. Copy the gray text under the project name. For example "myapp-5427d"
0 commit comments