PHPackages                             paragraph1/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. paragraph1/php-fcm

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

paragraph1/php-fcm
==================

PHP application server for google firebase cloud messaging (FCM)

0.7(9y ago)1991.2M↑60.1%68[8 PRs](https://github.com/Paragraph1/php-fcm/pulls)10MITPHPPHP &gt;=5.5

Since Jun 2Pushed 4y ago14 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (8)Used By (10)

phpFCM
======

[](#phpfcm)

[![Build Status](https://camo.githubusercontent.com/7eeadfdfc0a74fd1c27002fd50d50fda7a412208d833cbdb2b266695046002ff/68747470733a2f2f7472617669732d63692e6f72672f506172616772617068312f7068702d66636d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Paragraph1/php-fcm)[![Coverage Status](https://camo.githubusercontent.com/6a39ed3e1a9fa8bad9a11ec513b3228668de9c2da4b85584e9b6be7a0a89792d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f506172616772617068312f7068702d66636d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Paragraph1/php-fcm?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/1329fa71a09dbe4b8f1f8f07a0ff734de8c0a5fde099fe7051c7266ed2391aad/68747470733a2f2f706f7365722e707567782e6f72672f706172616772617068312f7068702d66636d2f762f737461626c65)](https://packagist.org/packages/paragraph1/php-fcm)[![Total Downloads](https://camo.githubusercontent.com/72fc6a135e3bb1127c1ec974ee52ea41917a7361261e97d41c9f047ff862332c/68747470733a2f2f706f7365722e707567782e6f72672f706172616772617068312f7068702d66636d2f646f776e6c6f616473)](https://packagist.org/packages/paragraph1/php-fcm)[![License](https://camo.githubusercontent.com/8272dd98d344be8002eeeb5ae78cf8347b5eb041d2863ee43bb984e2f1c25744/68747470733a2f2f706f7365722e707567782e6f72672f706172616772617068312f7068702d66636d2f6c6963656e7365)](https://packagist.org/packages/paragraph1/php-fcm)

PHP application server implementation for Firebase Cloud Messaging.

- supports device and topic messages
- currently this app server library only supports sending Messages/Notifications via HTTP.
- thanks to guzzle our library answers in PSR7 compatible response objects
- see the full docs on firebase cloud messaging here :
- Firebase Cloud Messaging HTTP Protocol:  for in-depth description

\#Setup The recommended way of installing is using Composer.

command line

```
composer require paragraph1/php-fcm

```

composer.json

```
"require": {
    "paragraph1/php-fcm": "*"
}

```

\#Send to Device also see

```
use paragraph1\phpFCM\Client;
use paragraph1\phpFCM\Message;
use paragraph1\phpFCM\Recipient\Device;
use paragraph1\phpFCM\Notification;

require_once 'vendor/autoload.php';

$apiKey = 'YOUR SERVER KEY';
$client = new Client();
$client->setApiKey($apiKey);
$client->injectHttpClient(new \GuzzleHttp\Client());

$note = new Notification('test title', 'testing body');
$note->setIcon('notification_icon_resource_name')
    ->setColor('#ffffff')
    ->setBadge(1);

$message = new Message();
$message->addRecipient(new Device('your-device-token'));
$message->setNotification($note)
    ->setData(array('someId' => 111));

$response = $client->send($message);
var_dump($response->getStatusCode());
```

\#Send to topic also see

```
use paragraph1\phpFCM\Client;
use paragraph1\phpFCM\Message;
use paragraph1\phpFCM\Recipient\Topic;
use paragraph1\phpFCM\Notification;

require_once 'vendor/autoload.php';

$apiKey = 'YOUR SERVER KEY';
$client = new Client();
$client->setApiKey($apiKey);
$client->injectHttpClient(new \GuzzleHttp\Client());

$message = new Message();
$message->addRecipient(new Topic('your-topic'));
//select devices where has 'your-topic1' && 'your-topic2' topics
$message->addRecipient(new Topic(['your-topic1', 'your-topic2']));
$message->setNotification(new Notification('test title', 'testing body'))
    ->setData(array('someId' => 111));

$response = $client->send($message);
var_dump($response->getStatusCode());
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity58

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.8% 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 ~13 days

Recently: every ~19 days

Total

7

Last Release

3561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e45b4ba0f6284e076cc794d0e45b28dcbb5abb33e6c610932ac6a8df2c141d1?d=identicon)[kbielenberg](/maintainers/kbielenberg)

![](https://www.gravatar.com/avatar/2340855d08ad8262656528acad7ef69a0d4b188a34e628e8f9ab51e606f20bda?d=identicon)[palbertini](/maintainers/palbertini)

---

Top Contributors

[![palbertini](https://avatars.githubusercontent.com/u/2226651?v=4)](https://github.com/palbertini "palbertini (55 commits)")[![kbielenberg](https://avatars.githubusercontent.com/u/962803?v=4)](https://github.com/kbielenberg "kbielenberg (21 commits)")[![fela98](https://avatars.githubusercontent.com/u/6069003?v=4)](https://github.com/fela98 "fela98 (1 commits)")[![itarato](https://avatars.githubusercontent.com/u/49009?v=4)](https://github.com/itarato "itarato (1 commits)")[![jenky](https://avatars.githubusercontent.com/u/1808758?v=4)](https://github.com/jenky "jenky (1 commits)")[![xuanskyer](https://avatars.githubusercontent.com/u/3071881?v=4)](https://github.com/xuanskyer "xuanskyer (1 commits)")

---

Tags

phpgooglenotificationsgcmfirebaseFCMandroidiosFirebase Cloud Messaging

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[kedniko/firebase-cloud-messaging-http-v1-php

Firebase cloud messaging http v1 php

124.8k](/packages/kedniko-firebase-cloud-messaging-http-v1-php)[redjanym/php-firebase-cloud-messaging

PHP SDK for Firebase Cloud Messaging from Google

39847.9k1](/packages/redjanym-php-firebase-cloud-messaging)[redjanym/fcm-bundle

A Symfony Bundle for projects to send notifications in mobile devices through Firebase Cloud Messaging HTTP V1 API

43453.0k](/packages/redjanym-fcm-bundle)[edwinhoksberg/php-fcm

A library for sending Firebase cloud messages and managing user topic subscriptions, device groups and devices.

68328.5k1](/packages/edwinhoksberg-php-fcm)

PHPackages © 2026

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