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

Onesignal Laravel Package

laravel-notification-channels/onesignal

OneSignal notification channel for Laravel. Send push notifications through OneSignal using Laravel’s notification system, with support for segments, filters, custom data, buttons, and platform-specific delivery options.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged by 2.8.1. The package remains a thin Laravel notification-channel adapter over OneSignal's REST API. It fits cleanly if the application already uses Laravel's Notification facade and Notifiable models — you add onesignal as one more channel alongside mail/database/broadcast and implement toOneSignal($notifiable) plus routeNotificationForOneSignal(). Laravel keeps ownership of domain events and templating; OneSignal becomes the mobile push delivery layer. That separation is the right shape. The important caveat is that the package covers delivery only — device/subscription registration, permission prompts, and external-ID lifecycle live in the mobile client. That is routinely underestimated as "out of scope" and then becomes the critical path.

Integration feasibility. Low effort on the PHP side, and slightly lower than before if you are on a Laravel 13 track. composer require, publish config, add app_id + REST API key under config/services.php, implement the message and route methods, queue the notification. First end-to-end send is realistically 1–3 dev-days including credential setup and a test harness. Total feature timeline is dominated by the mobile release, not the backend work.

Technical risk.

  • Upstream API drift. Still the top risk, and 2.8.1 does nothing to address it. Version 2.8.1 is a single-change compatibility release (Laravel 13.x support, PR #164 by laravel-shift) and touches no OneSignal API surface. OneSignal has been migrating from the v1 surface (player IDs, include_player_ids, account-level REST key) to a v2 surface (app-scoped paths, external_id, subscription IDs). Released package versions differ in which they target. Pin the version, and confirm the pinned release uses the API shape OneSignal will still support at your horizon date.
  • Silent failures. OneSignal can return HTTP 200 with a populated errors array. If the channel only checks status codes, sends appear successful while delivering nothing. 2.8.1 does not report a change here, so assume the earlier finding stands until you read the pinned source. Verify whether the version inspects the response body; if not, wrap it.
  • Maintenance model. Marginally improved signal, not a change in posture. Community-maintained under the laravel-notification-channels org, MIT, ~294 stars, no SLA. The 2.8.1 release shows the project is still accepting maintenance patches — including from laravel-shift, the official Laravel upgrade service — which is a positive liveness indicator. It is not a support commitment: still no SLA, still a real bus factor, still assume you may need to fork or patch.
  • Credential blast radius. The REST API key can send to your entire user base. Treat it as a production secret with rotation and vaulting, not a .env committed by habit.
  • Payload constraints. Data payload size limits, English-default content fields, and no delivery-order guarantees all need to be designed around upstream, not discovered in production.

Key questions.

  1. Which OneSignal API version does the pinned release target, and what is the migration path when that version sunsets? (2.8.1 does not change the answer — re-confirm against the pinned source, not the changelog.)
  2. Does 2.8.1's Laravel 13 support come with any constraint changes — PHP floor, Guzzle major, or Illuminate version bounds — that conflict with our matrix?
  3. Does the channel support external_id targeting and OneSignal's current subscription model, or only legacy player IDs?
  4. What is the recent commit/release cadence and open-issue backlog? Are there unresolved delivery-correctness reports? 2.8.1 is a maintenance-only release; treat it as evidence of liveness, not evidence that correctness gaps are closed.
  5. Does it surface the errors-in-200 response shape to the caller?
  6. Are segments/topics and scheduled delivery supported, or only direct-to-user sends?

Integration Approach

Stack fit. Laravel 10/11/12-era, PHP 8.1+, standard Guzzle-based HTTP — now with a documented Laravel 13 path as of 2.8.1. Confirm the Illuminate constraint bounds rather than inferring from the changelog headline; patch releases under the same minor sometimes widen bounds while leaving PHP or Guzzle untouched. It composes with queued notifications (ShouldQueue) for free, which is the correct default for push. If the team is already notification-centric, this is near-zero architectural friction; if push would be the first use of the notification system, you are adopting two things at once — scope accordingly.

Migration path. Greenfield push → adopt directly. Replacing direct FCM/APNs or another channel → run in parallel behind a per-notification-type feature flag: dual-send, compare delivery and open rates, then cut over, keeping the legacy path for one release cycle. Do not attempt a single-step cutover on business-critical notifications.

Compatibility. 2.8.1 is additive compatibility — the low-risk shape of change (no breaking changes, no deprecations announced, no API surface movement). Two consequences: (a) if you are planning a Laravel 13 upgrade, this package is no longer a blocker, so remove it from that risk register; (b) a patch bump means you should still re-run your send-path smoke test after upgrading, because a widened framework constraint can pull a different Illuminate resolution into your lockfile. Version-lock the package and record the OneSignal API version it speaks in your dependency register — that is the thing that will break, not PHP compatibility.

Sequencing. Unchanged.

  1. OneSignal app setup, separate staging and production apps; keys into the secret store.
  2. Install + config in staging; smoke-test to a single hardcoded device. Take 2.8.1 here if you are on Laravel 13, otherwise it is a routine patch.
  3. Client-side external-ID lifecycle — SDK init, login(appUserId) on authentication, logout() on sign-out. This is the real critical path and requires a mobile release plus store review.
  4. Ship one low-risk transactional notification; instrument delivery.
  5. Expand to engagement/marketing sends and segments.
  6. Decommission the legacy path.

The PHP integration is step 2. Steps 3 and 4 are where the schedule lives.

Operational Impact

Maintenance. Small code surface, three failure points you don't own: the package, OneSignal's API, and Apple/Google push infrastructure. 2.8.1 is a good data point — the project is being kept current with Laravel's release train, which lowers the odds of being stranded by a framework upgrade — but it does not address the OneSignal API drift risk, which remains the exposure that actually requires planning. Budget a quarterly dependency review and a named owner for the OneSignal account, credentials, and plan. OneSignal has changed pricing and feature gating over time; those changes can affect you with no code change on your side.

Support. MIT, community-supported, no vendor escalation. Your team must be able to read the channel source and patch it. Mitigate by wrapping usage in a single internal abstraction (one base notification class or a PushSender service) so a package swap touches one file rather than fifty.

Scaling. Fan-out is OneSignal's problem; your ceiling is queue throughput and OneSignal's rate limits. Keep sends off the request path, throttle or batch where limits apply, and model cost against subscriber/MAU growth on OneSignal's plan rather than against package usage.

Failure modes and detection.

  • Invalid or rotated REST key → 401 across all sends; alert on error rate, not on individual failures.
  • Unmapped recipient (no external ID, device unregistered) → silent no-op; count "notifiable had no route" and dashboard it.
  • 200-with-errors → false-positive success; assert on body.
  • Queue backlog → stale, confusing pushes; add drop-if-older-than TTL for time-sensitive types.
  • OneSignal outage or endpoint deprecation → no automatic fallback; decide now whether email or in-app is the degraded path and wire the flag.
  • Post-upgrade resolution shift → a patch bump that widens Illuminate bounds changes what composer resolves; smoke-test the send path after 2.8.1 rather than assuming a green build is a green channel.

Ramp-up. A Laravel-fluent engineer is productive on the channel in under a day. The learning curve is the external-ID contract between backend and mobile — write it down, share it across both teams, and keep a short runbook: how to rotate keys, how to send to one test device, and where to look first when delivery drops.

Verdict. 2.8.1 is a maintenance-only release: it removes Laravel 13 from the compatibility risk column and gives a modest positive signal on project liveness, with no breaking changes, no new features, and no change to the OneSignal API-drift exposure that drives the decision. Green-light where the team is already on Laravel notifications and push is a secondary channel. Yellow-light where push is business-critical and there is no in-house capacity to fork and patch a community package whose upstream API is actively changing.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource