PHPackages                             g9rga/php-fcm - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. g9rga/php-fcm

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

g9rga/php-fcm
=============

Php library to send push notification via google fcm

1.0.0(7y ago)02.9kMITPHP

Since Jun 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/g9rga/php-fcm)[ Packagist](https://packagist.org/packages/g9rga/php-fcm)[ RSS](/packages/g9rga-php-fcm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

### Status

[](#status)

[![Build Status](https://camo.githubusercontent.com/7a1d8bffdadeb0723c4e9f4dc40c32f879b771a96db63720bc623f12e505d054/68747470733a2f2f7472617669732d63692e6f72672f67397267612f7068702d66636d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/g9rga/php-fcm)

php-fcm
=======

[](#php-fcm)

Php library to send push notification via google fcm with guzzle

Usage example
-------------

[](#usage-example)

```
use g9rga\phpFcm\src\AccessToken\FileObtainer;
use g9rga\phpFcm\src\AccessToken\AccessToken;
use g9rga\phpFcm\src\Client;
use g9rga\phpFcm\src\Notification\AndroidNotification;
use g9rga\phpFcm\src\Target\TokenTarget;

/*
    To retrieve access token you can use builtin FileObtainer class
    or your own class by implementeting ObtainerInterface
*/
/*
    File content example:
    {
      "type": "service_account",
      "project_id": "project___",
      "private_key_id": "",
      "private_key": "",
      "client_email": "",
      "client_id": "",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://accounts.google.com/o/oauth2/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": ""
    }

*/
$obtainer = new FileObtainer('crentials_file_path');

$accessToken = new AccessToken($obtainer);

/*
    Optionally you can pass your own PSR-16 cache adapter to cache access token
    InMemoryCache used by default
    $accessToken->setCache();
*/

/*
    Client requires Request adapter to make requests.
    You can use GuzzleRequestAdapter or you own implementation RequestInterface
*/
$guzzleRequest = new GuzzleRequestAdapter();
$guzzleRequest->setGuzzleClient(new \GuzzleHttp\Client());

$target = new TokenTarget('client_token');

$androidNotification = new AndroidNotification();
$androidNotification->setTitle('Push notification title');
$androidNotification->setBody('Push notification body');

$client = new Client($guzzleRequest, $accessToken);
$result = $client->send($target, $androidNotification);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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

Unknown

Total

1

Last Release

2889d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/263ae75283900b83e0a0b625e8f8e9ebd298fb0280bce560b1c83c5c5c0b960c?d=identicon)[g9rga](/maintainers/g9rga)

---

Top Contributors

[![dskismia](https://avatars.githubusercontent.com/u/42341819?v=4)](https://github.com/dskismia "dskismia (15 commits)")[![gibgibik](https://avatars.githubusercontent.com/u/944617?v=4)](https://github.com/gibgibik "gibgibik (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/g9rga-php-fcm/health.svg)

```
[![Health](https://phpackages.com/badges/g9rga-php-fcm/health.svg)](https://phpackages.com/packages/g9rga-php-fcm)
```

###  Alternatives

[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)[redjanym/php-firebase-cloud-messaging

PHP SDK for Firebase Cloud Messaging from Google

39847.9k1](/packages/redjanym-php-firebase-cloud-messaging)[devkandil/notifire

A Laravel package for sending Firebase Cloud Messaging (FCM) notifications

7510.4k](/packages/devkandil-notifire)[paxha/laravel-fcm

This package provides (Laravel Notification) channels for sending notifications via FCM (Firebase Cloud Messaging) using HTTP v1 API.

101.4k](/packages/paxha-laravel-fcm)

PHPackages © 2026

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