PHPackages                             matthew-p/yii2-fcm-component - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. matthew-p/yii2-fcm-component

ActiveYii2-extension[Queues &amp; Workers](/categories/queues)

matthew-p/yii2-fcm-component
============================

Very simple fcm component for yii2

1.3(6y ago)18882BSD-3-ClausePHP

Since May 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/MatthewPattell/yii2-fcm-component)[ Packagist](https://packagist.org/packages/matthew-p/yii2-fcm-component)[ RSS](/packages/matthew-p-yii2-fcm-component/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Firebase cloud messaging for Yii2
=================================

[](#firebase-cloud-messaging-for-yii2)

Very simple FCM component for yii2

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Add

```
"matthew-p/yii2-fcm-component": "^1.0"

```

to the require section of your `composer.json` file.

and

```
{
  "type": "git",
  "url": "https://github.com/MatthewPattell/yii2-fcm"
},
{
  "type": "git",
  "url": "https://github.com/MatthewPattell/php-fcm"
}

```

to the repositories section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by:

In config main.php:

```
...
'components' => [
    ...
    'fcm' => [
        'class'  => \MP\Fcm\FcmComponent::class,
        'apiKey' => 'sampleKey',
    ],
    ...
],
...
```

Use:

```
// Send to topic
$message = [
    'topic' => 'sampleChannelID',
    'data'  => [
        'sample1' => 'test'
    ],
];

$notification = ['key' => 'samplePushMessageKey'];

Yii::$app->fcm->pushTopic($message, $notification);

// Send to device
$message = [
    'device' => 'sampleDeviceToken',
    'data'   => [
        'sample1' => 'test'
    ],
];
Yii::$app->fcm->pushDevice($message, $notification);
```

See $notification configuration in \\MP\\Fcm\\FcmComponent::NOTIFICATION\_DEFAULT

That's all. Check it.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~216 days

Total

4

Last Release

2324d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/624ecdaa0fb10377abf846c22f1292f5dfc6b1a9277b3e239e323733565ae241?d=identicon)[hellboymxb@gmail.com](/maintainers/hellboymxb@gmail.com)

---

Top Contributors

[![MatthewPattell](https://avatars.githubusercontent.com/u/10459911?v=4)](https://github.com/MatthewPattell "MatthewPattell (3 commits)")[![zanevskyas](https://avatars.githubusercontent.com/u/8545720?v=4)](https://github.com/zanevskyas "zanevskyas (1 commits)")

---

Tags

messagecloudfirebaseFCMyii2extensioncomponent

### Embed Badge

![Health badge](/badges/matthew-p-yii2-fcm-component/health.svg)

```
[![Health](https://phpackages.com/badges/matthew-p-yii2-fcm-component/health.svg)](https://phpackages.com/packages/matthew-p-yii2-fcm-component)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[trntv/yii2-command-bus

Yii2 Command Bus extension

57660.0k8](/packages/trntv-yii2-command-bus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
