Skip to content

Releases: ker0x/fcm

v3.2.0

15 Feb 09:42
3a2449e
Compare
Choose a tag to compare

Warning

Version 3.2 introduce a BC break.
The signature of the __construct() method of the Kerox\Fcm\Model\Message class has changed, with the $notification parameter becoming the third argument and being optional.

final class Message
{
-   public Notification $notification;
+   public ?Notification $notification = null;
    public ?string $token = null;
    public ?string $topic = null;
    public ?string $condition = null;

    /**
     * @param array<string, string> $data
     */
    public function __construct(
-       Notification|string $notification,
        Token|Topic|Condition $target,
        public array $data = [],
+       Notification|string|null $notification = null,
        public ?AndroidConfig $android = null,
        public ?WebpushConfig $webpush = null,
        public ?ApnsConfig $apns = null,
        public ?FcmOptions $fcmOptions = null,
    ) {
+      if (null !== $notification) {
            $this->notification = \is_string($notification)
                ? new Notification($notification)
                : $notification
            ;
+       }

        match (true) {
            $target instanceof Token => $this->token = $target->__toString(),
            $target instanceof Topic => $this->topic = $target->__toString(),
            $target instanceof Condition => $this->condition = $target->__toString(),
        };
    }
}

Before

$message = new Message(
    notification: 'Breaking News',
    target: new Topic('TopicA'),
    data: [
        'story_id' => 'story_12345',
    ],
);

After

$message = new Message(
    target: new Topic('TopicA'),
    data: [
        'story_id' => 'story_12345',
    ],
    notification: 'Breaking News',
);

What's Changed

  • 🐛 Allow to send message with data only by @ker0x in #27

Full Changelog: 3.1.0...3.2.0

v3.1.0

27 Dec 10:54
54495ea
Compare
Choose a tag to compare

What's Changed

  • 🐛 Fix README by @ker0x in #23 and #25
  • 🐛 Fix .gitattributes by @ker0x in #24
  • ⬆️ Bump Symfony components to 6.4, allow Symfony 7 by @ker0x in #25
  • 💚 Update CI workflow by @ker0x in #25
  • 🚨 Fix PHP-CS-Fixer and PHPStan warning by @ker0x in #25

Full Changelog: 3.0.0...3.1.0

3.0.0

20 May 10:15
fcafc70
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.0...3.0.0

2.4.0

17 May 13:15
e3e804e
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.3.0...2.4.0

2.3.0

11 Feb 10:19
bde3d7f
Compare
Choose a tag to compare

Changelog (since 2.2.0)

  • 2.3.0 (2021-02)
    • Bump minimal PHP version to 7.3
    • Bump Guzzle version to 7.2
    • Bump PHPUnit version to 8.0
    • Update .gitattributes
    • Update CI workflow

2.2.0

31 Oct 14:46
c686905
Compare
Choose a tag to compare

Changelog (since 2.1.0)

  • 2.2.0 (2020-10)
    • Add direct_book_ok parameter for Android configuration.
    • Change test namespace from Tests\Kerox\Fcm to Kerox\Fcm\Tests
    • Update PHPStan to 0.12

2.1.0

27 Jan 13:10
caadb94
Compare
Choose a tag to compare

Changelog (since 2.0.0)

  • 2.1.0 (2020-01)
    • Change class properties visibility from protected to private.
    • Add new configurations classes
      • Kerox\Fcm\Model\Message\Notification\AndroidNotification\Color::class
      • Kerox\Fcm\Model\Message\Notification\AndroidNotification\LightSettings::class
      • Kerox\Fcm\Model\Message\Notification\ApnsNotification\Sound::class
    • Add new options classes
      • Kerox\Fcm\Model\Message\Options\AndroidOptions::class
      • Kerox\Fcm\Model\Message\Options\ApnsOptions::class
      • Kerox\Fcm\Model\Message\Options\WebpushOptions::class
    • Kerox\Fcm\Model\Message\Notification\AndroidNotification::class: add new properties
      • $channelId
      • $ticker
      • $sticky
      • $eventTime
      • $localOnly
      • $notificationPriority
      • $defaultSound
      • $defaultVibrateTimings
      • $defaultLightSettings
      • $vibrateTimings
      • $visibility
      • $lightSettings
      • $image
    • Kerox\Fcm\Model\Message\Notification\ApnsNotification\Alert::class: add new properties
      • $subTitle
      • $subTitleLocKey
      • $subTitleLocArgs
    • Kerox\Fcm\Model\Message\Android::class: add new property $options.
    • Kerox\Fcm\Model\Message\Apns::class: add new property $options.
    • Method Kerox\Fcm\Model\Message\Webpush::setOptions(), type array is deprecated, use class Kerox\Fcm\Model\Message\Options\WebpushOptions::class instead.
    • Method Kerox\Fcm\Model\Message\AbstractNotification\Alert::setActionLocKey() is deprecated and will be removed in 3.0 with no replacement.

2.0.1

14 Oct 23:12
496697e
Compare
Choose a tag to compare

Changelog (since 2.0.0)

  • 2.0.1 (2018-10)
    • Removes double "projects" folder causing 404. (Thanks to @juansaab)

2.0.0

25 Sep 19:40
0382c91
Compare
Choose a tag to compare

Changelog (since 1.0.1)

  • Rewrite library to be compatible with HTTP v1 API
  • Improve tests
  • Refactor code
  • Move documentation to the Wiki section of the repo

1.0.1

30 Oct 19:35
Compare
Choose a tag to compare
  • Remove type hinting return from methods in Request class to prevent Exception when a push is send without data, options or notification