- Does redjanym/php-firebase-cloud-messaging support the FCM HTTP v1 API?
- The package metadata alone does not confirm this, so audit the source before adopting it. Look for messages:send calls, OAuth2 service-account credentials and access-token caching and refresh logic. The description's mention of device groups and a lightweight client are warning signs of the retired legacy HTTP API, since device-group messaging was legacy-only. If the code only sends with a server key, treat it as legacy-only and not viable for new work.
- How do I install and configure this package in a Laravel app?
- Install it with Composer and confirm the PHP, Laravel and Guzzle/PSR-18 constraints in its composer.json before writing any code. Store credentials in config/services.php backed by a secrets manager rather than a committed .env file. Check whether Laravel package discovery is supported or whether you must register a service provider manually. Wrap the client in your own adapter and dispatch sends from queued jobs with explicit timeouts and retries.
- Is this package still usable after Google shut down the legacy FCM APIs in 2024?
- Only if it uses FCM HTTP v1 with OAuth2 service-account credentials, because legacy server-key sends no longer work. The package description's device-group support and lightweight client framing suggest legacy API usage, so verify the transport in the source. If it is legacy-only, keep your gateway interface and replace just the implementation with an HTTP v1 client such as kreait/firebase-php plus google/auth.
- How do I send a push notification to multiple device tokens with this package?
- FCM HTTP v1 enforces a 500-token limit per multicast request, so your adapter must chunk large token lists. You also need per-token results to know which sends succeeded and which tokens are dead, so confirm the package exposes the response body rather than a single boolean. Keep payloads under the 4 KB limit and test chunking behaviour against real devices before relying on it in production.
- Can I use this package with Laravel notifications?
- Yes, but build a custom notification channel that delegates to an internal PushGateway service rather than calling package classes directly. This keeps FCM-specific models and fluent builders out of your domain code and lets you swap the transport later without touching call sites. Contract tests around the gateway make the package an implementation detail instead of a dependency spread across the app.
- Which PHP and Laravel versions does redjanym/php-firebase-cloud-messaging support?
- The supported versions are not documented in the available metadata, so read the composer.json constraints before adoption. The intended target is PHP 8.x with Laravel 10, 11 or 12, but you must confirm Guzzle or PSR-18 compatibility and check for dependency conflicts in your lockfile. A short install spike in a throwaway branch is the fastest way to surface constraint problems.
- What credentials does it need: a legacy server key or a service-account JSON file?
- FCM HTTP v1 requires a service-account JSON file used to obtain and refresh OAuth2 access tokens, while the retired legacy API used a server key. Check which one the package expects, because a server-key-only implementation cannot send messages today. Store the service-account file in a secrets manager, rotate it on a schedule, and never commit it to source control.
- Is this package actively maintained and safe for production?
- It has a small user base, an unknown repository location and no visible CI or security policy, so treat it as community-supported with no vendor SLA. Pin the version, monitor upstream releases, and avoid undocumented fluent methods that could change without notice. Budget internal ownership for credential rotation, dependency upgrades and FCM API changes, and be prepared to fork the transport layer.
- How do I handle invalid or expired device tokens with FCM?
- FCM reports unregistered or not-found tokens in the per-token response, so your gateway needs access to those individual results rather than an aggregate success flag. Mark those tokens as invalid in your database and stop sending to them, ideally through a queued cleanup job. If the package collapses responses, add a thin parsing layer or fork the transport to expose the raw FCM payload.
- What are the alternatives to this package for Firebase push in Laravel?
- The common choice is kreait/firebase-php with google/auth, which supports FCM HTTP v1 and OAuth2 token handling, alongside community notification channels such as laravel-notification-channels/fcm. Whichever you pick, keep it behind your own PushGateway interface so a future swap is a one-file change. Run shadow traffic to test devices and compare payloads and responses before cutting over from an existing implementation.