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

Php Firebase Cloud Messaging Laravel Package

redjanym/php-firebase-cloud-messaging

A lightweight PHP library for sending Firebase Cloud Messaging push notifications. Compose notification and data payloads and target device tokens, groups, or topics from Laravel or any PHP application.

Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Good fit as a thin outbound adapter for an existing notification service. The fluent message builder maps cleanly to a PushGateway interface and a Laravel custom notification channel, but package classes should not leak into domain code. Keep payload construction, targeting, and transport behind an internal boundary so FCM-specific models do not spread across the application.
  • Integration feasibility: Low initial effort for a Laravel/PHP team: Composer install, credentials in config/services.php or secrets manager, queued jobs for dispatch. Confirm PHP/Laravel version constraints, PSR-18/Guzzle compatibility, and whether Laravel package discovery is supported. A one-day spike should validate authentication and a real send to Android, iOS, and web clients.
  • Technical risk: The critical unknown is whether the package uses FCM HTTP v1 with OAuth2 service-account credentials, or the retired legacy HTTP API with server keys. The description’s device-group support and “lightweight client” framing are yellow flags for legacy API usage; Google shut down the legacy FCM APIs in 2024. If this package is legacy-only, it is not viable for new work. Secondary risks: repository unknown, 37 stars, no visible CI/security policy, and bus-factor concerns. The recent release date is positive but must be verified against source, not metadata.
  • Key questions: Does it support FCM HTTP v1 messages:send and OAuth2 token caching/refresh? Does it return per-token results for multicast sends? Does it enforce the 500-token multicast limit and 4 KB payload limit? How does it classify retryable versus terminal errors? Does it support APNs and web push platform options? Are there tests, CI, static analysis, and a security policy? Who maintains it, and what is the release cadence? Does it support token pruning and invalid-registration-token handling?

Integration Approach

  • Stack fit: Suitable for Laravel 10/11/12 and PHP 8.x applications as an implementation detail behind App\Services\Push\PushGateway. Use a custom Laravel notification channel for developer ergonomics, but route all sends through the gateway. Keep FCM credentials in a secrets manager, not .env files committed to source.
  • Migration path: If replacing direct FCM calls or another package, introduce the gateway interface first, implement it with this package, and keep the existing call sites unchanged. Run shadow traffic to test devices and compare payloads/responses before cutover. If the package turns out to be legacy-only, replace only the gateway implementation with an HTTP v1 client such as kreait/firebase-php plus google/auth, or fork the transport layer.
  • Compatibility: Verify PHP constraint, Laravel support, Guzzle/PSR-18 version, and dependency conflicts before adoption. Check whether the package expects a legacy server key or a service-account JSON file; the latter is mandatory for HTTP v1. Validate behavior under Laravel queues, retries, and timeouts.
  • Sequencing: 1) Source and security audit, including API version used. 2) Proof of concept for OAuth2 credential flow and a real FCM v1 send. 3) Build the PushGateway adapter and Laravel notification channel. 4) Add queueing, retry/backoff, batch limits, and invalid-token cleanup. 5) Add observability and runbooks. 6) Roll out by platform and cohort, starting with internal test devices.

Operational Impact

  • Maintenance: Internal maintenance is low because the wrapper is thin, but external package risk is material. Pin the version, monitor upstream releases, and be prepared to fork. Avoid relying on undocumented fluent methods; cover the adapter with contract tests so the package can be swapped without changing application code.
  • Support: Community-only support with a small user base and no vendor SLA. Escalation depends on maintainer responsiveness and source access. Budget internal ownership for credential rotation, dependency upgrades, and FCM API changes. Do not treat 37 stars as production-grade assurance without a source review.
  • Scaling: FCM absorbs device fan-out, but the application still controls throughput. Send from queued workers, not synchronously in request paths. Respect HTTP v1 multicast limits (500 tokens per request), use topics for large audiences, reuse OAuth2 access tokens, and apply exponential backoff on 429/5xx responses. Monitor queue depth, send latency, and success rate by platform.
  • Failure modes: Authentication failures from expired/rotated service-account credentials; invalid or unregistered tokens; quota exhaustion; payload-size and platform-option errors; timeouts and duplicate sends from retries. Define retry policy by error class, make sends idempotent where possible, and prune invalid tokens automatically. Avoid logging device tokens or notification payloads containing PII.
  • Ramp-up: A Laravel developer can integrate the happy path in one to two days. Production readiness requires additional effort for OAuth2 credential handling, queue/retry semantics, token lifecycle management, and FCM error taxonomy. Operations needs a runbook covering credential rotation, quota incidents, invalid-token spikes, and rollback to the previous push provider.
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route