Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Fcm Laravel Package

williamcruzme/laravel-fcm

Laravel FCM is a Laravel package for sending Firebase Cloud Messaging push notifications. It offers a simple API for targeting devices, topics, and conditions with notification and data payloads, making mobile push setup straightforward.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. williamcruzme/laravel-fcm is a thin, idiomatic Laravel wrapper: a service provider, a facade/contract, a publishable config/fcm.php, and a small message-builder API for sending to device tokens, topics, and conditional audiences. Architecturally it is a transport adapter, not a notification framework — it does not own templating, user preference management, delivery analytics, or token lifecycle. That is a reasonable seam, but it means the package occupies the lowest-value, highest-commodity layer of our push stack. Everything that actually differentiates our notification system (audience segmentation, quiet hours, idempotency, token hygiene) sits outside it and remains our build.

Integration feasibility. Integration cost is genuinely low: composer require, publish config, inject credentials, call the facade from a job or service. A competent Laravel engineer can produce a working spike in under a day. The real question is not effort, it is validity — whether the HTTP contract the package speaks still exists.

Technical risk. Rated high, for four compounding reasons:

  1. API lifecycle (dominant risk). The package’s design predates FCM’s HTTP v1 migration; the credential model in a config-driven FCM wrapper of this era is typically a static server key against the legacy fcm/send endpoint. Google retired the legacy FCM HTTP/XMPP APIs in June 2024 in favor of HTTP v1 with OAuth2 service-account bearer tokens. If this package is legacy-only, it is functionally dead code regardless of its own quality — this must be verified before any other evaluation effort is spent.
  2. Bus factor. 64 stars and a score near 1.0 indicate a single-maintainer, low-adoption project with no meaningful community backpressure. There is no crowd to absorb a CVE, a Laravel major bump, or a Google API change. We would be the maintainer in practice.
  3. Framework ceiling. Laravel moves fast; a package at this adoption level typically lags two or more majors behind. Constraint conflicts with our Laravel/PHP version are likely and would force either a downgrade (unacceptable) or a fork.
  4. Secret handling. Static server keys in a config file are long-lived, broadly scoped, and hard to rotate — a poor fit for our credential-rotation posture versus short-lived OAuth2 tokens from a service account.

Key questions (decision gates). Does it target HTTP v1 with OAuth2, or the legacy server key? What are its declared composer.json constraints for laravel/framework and PHP, and do they intersect our target versions? Is there CI and a test suite covering request construction and error responses? Does it expose batch/multicast, topic conditions, and per-message platform overrides? How does it surface partial failures (FCM returns per-token results, not a single boolean)? Does it integrate with Laravel’s Notification channel system, or is it facade-only? What is the maintainer’s commit and issue response history over the last 18 months?

Sizing note. The package is a few hundred lines of HTTP plumbing. The cost to replicate its useful surface in-house — or to adopt a maintained alternative — is small relative to the cost of adopting an unmaintained dependency in a customer-facing delivery path. Dependency risk here is asymmetric and unfavorable.

Integration Approach

Stack fit. Good shape, poor currency. The service-provider/facade pattern matches our conventions and would feel native to the team; the underlying protocol vintage does not match the platform we are actually integrating with. Treat the pattern as reusable and the implementation as suspect.

Migration path. Three viable routes, in descending order of preference:

  1. Adopt a maintained transport — kreait/laravel-firebase or laravel-notification-channels/fcm — both of which track HTTP v1 and slot into Laravel’s Notification channel. Lowest long-term cost, requires reworking call sites if we have already written against this facade.
  2. Thin in-house adapter behind a PushTransport interface, calling FCM HTTP v1 directly. Justified here precisely because the package adds so little: we own ~300 lines and eliminate the bus factor. Credentials come from a service account via our secret manager.
  3. Fork and patch — only defensible if the package’s message-builder ergonomics are genuinely valued by the team and someone is named as owner. Otherwise this is adopting maintenance debt to avoid a one-week rewrite.

Either way, do not let the facade leak into domain code. Define an internal PushSender port with our own value objects (recipient, payload, priority, collapse key, TTL). The package — or its replacement — becomes a swappable adapter.

Compatibility. Pin and verify: Laravel/PHP constraint intersection, package auto-discovery, config publish tag, facade alias registration, and behavior under QUEUE_CONNECTION with retries and failed() hooks. Confirm the package does not assume a specific HTTP client version that conflicts with Guzzle in our lockfile.

Sequencing.

  1. Gate 0 (½ day): read source for endpoint and auth model. If legacy-only, stop — skip to route 1 or 2.
  2. Spike (2–3 days): real GCP project, real device tokens, cover success, invalid token, 429, 5xx.
  3. Port definition (1 week): internal PushSender interface, value objects, error taxonomy.
  4. Adapter implementation + contract tests against a stubbed FCM.
  5. Shadow/pilot: one low-risk notification type to internal users; compare delivery rates against the incumbent path.
  6. Cutover with feature flag and a documented rollback to the previous sender.

Operational Impact

Maintenance. Assume we own it. Budget a named owner and a quarterly review tied to Laravel major releases and Google API announcements. Because the dependency surface is small, the blast radius is small — but so is the leverage from patching it; at some point forking becomes cheaper than tracking upstream.

Support. Community-only, no SLA, effectively no issue throughput at this adoption level. Internal enablement is required: a runbook covering credential rotation, token invalidation, and FCM error-code interpretation. Do not assume answers exist in the project’s issue tracker.

Scaling. FCM absorbs the fan-out, so our scaling concern is throughput shaping, not delivery. Two practical constraints: multicast requests are capped (historically ~1,000 tokens per legacy request; 500 per HTTP v1 multicast call), so batching and chunking are our responsibility; and sending must run on queue workers with concurrency limits to stay under FCM’s per-project rate limits. Large campaigns should be segmented into jobs with jitter, not issued as one call.

Failure modes to instrument explicitly.

  • Hard deprecation: legacy endpoint returns 404/410 — the package fails wholesale, not gracefully. Detect with a synthetic canary send.
  • Auth expiry/rotation: 401 after key rotation; OAuth2 token refresh failures under HTTP v1.
  • Quota: 429 and 5xx — needs exponential backoff with jitter and a dead-letter path.
  • Partial success: FCM returns per-token results; a naive implementation reports "sent" when 30% of tokens were rejected. Parse results/errors, emit metrics per error class.
  • Token decay: UNREGISTERED/INVALID_ARGUMENT responses are the signal to prune tokens. Without pruning, deliverable rate silently degrades — this is the most common and most invisible production failure in push systems.
  • Silent drop: notification permission disabled at OS level; invisible to the server. Only client-side telemetry reveals it.

Ramp-up. Low for the package (hours for a Laravel developer). Moderate for the domain (days): token lifecycle, topic vs. token targeting, platform-specific payload shapes, and delivery-rate interpretation. The package teaches none of this, and it is where incidents actually come from.

Recommendation. Do not adopt as a strategic dependency. Use the pattern, not the package: define an internal push port, implement it against FCM HTTP v1 — via a maintained alternative or a small in-house adapter — and treat williamcruzme/laravel-fcm as a time-boxed reference implementation. Re-evaluate only if a maintainer demonstrates active HTTP v1 support and current Laravel compatibility.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums