- What is symfony/gatewayapi-notifier?
- It is a small Symfony Notifier bridge for sending SMS through GatewayAPI. It registers a gatewayapi:// DSN, maps SmsMessage objects to GatewayAPI's POST /rest/messages endpoint, and exposes provider options such as class, callbackUrl, userRef, and label. It is roughly a 200-line transport bridge, not a full SMS platform.
- Can I use symfony/gatewayapi-notifier in a Laravel application?
- You can install it in a Laravel app because Symfony components coexist with Laravel, but it is not Laravel-native. Laravel has Illuminate\Notifications and its own channel contract, so using this package means running a parallel Symfony Notifier stack or writing an adapter. For most Laravel teams, a small Laravel-native GatewayAPI client is simpler unless you already use Symfony Notifier.
- How do I install and configure the GatewayAPI DSN in Symfony?
- Install with composer require symfony/gatewayapi-notifier and configure a DSN like gatewayapi://TOKEN@default?from=FROM. TOKEN is the GatewayAPI OAuth API token and FROM is the sender name registered in your GatewayAPI account. Keep the DSN in environment configuration rather than hard-coding credentials.
- How do I send an SMS with GatewayApiOptions?
- Create an SmsMessage with the recipient number and text, then attach a GatewayApiOptions instance if you need provider-specific fields. The options support class, callbackUrl, userRef, label, and other GatewayAPI REST parameters. Pass the message to Symfony Notifier's TexterInterface send method.
- Does symfony/gatewayapi-notifier handle delivery receipts or incoming SMS webhooks?
- No. The callbackUrl option only tells GatewayAPI where to send a delivery receipt; the package does not provide or validate a webhook endpoint. It also does not receive inbound SMS, retry failed sends, or process idempotent callbacks. You must build and secure any callback handler yourself.
- Which PHP and Symfony versions does symfony/gatewayapi-notifier support?
- Version compatibility follows the Symfony minor you install: Symfony 8.x requires PHP 8.4 or newer, while Symfony 7.4.x targets PHP 8.2 and 8.3. Pin the bridge to the Symfony minor that matches your application's PHP baseline and verify with composer why-not. Laravel version support is not provided by this package because it is a Symfony Notifier bridge.
- Is symfony/gatewayapi-notifier maintained and production-ready?
- It is part of Symfony's subtree-split repositories, so low GitHub stars or dependent counts do not mean it is abandoned; real usage flows through symfony/notifier. It is stable but not feature-rich, with release notes often saying no significant changes. Treat Symfony's brand as framework maintenance, not as a vendor SLA for your GatewayAPI integration.
- How can I test GatewayAPI SMS sending without hitting the real API?
- The bridge itself has no built-in fake or sandbox mode, so isolate it behind a small interface or Laravel notification channel and fake that in tests. For Symfony Notifier, use a test transport or mock the HTTP client used by the bridge. Assert that your code builds the expected SmsMessage and GatewayApiOptions rather than calling GatewayAPI in unit tests.
- What alternatives should Laravel developers consider for GatewayAPI SMS?
- For Laravel, the natural alternative is a Laravel-native notification channel or a small HTTP client that posts directly to GatewayAPI's REST endpoint. You can also use a provider-agnostic SMS package if you need multiple gateways or fallback routing. This Symfony bridge makes sense mainly if you already run Symfony Notifier and want GatewayAPI as one transport.
- What production concerns come with using this bridge for SMS?
- The package only sends the HTTP request, so you still need E.164 phone number normalization, queued sends with retry and backoff, delivery-receipt handling, and opt-out or quiet-hours compliance. Sender ID registration for Nordic and EU carriers can take weeks, and GatewayAPI coverage is strongest in the Nordics and EU. Monitor cost per segment and consider a fallback provider or circuit breaker if SMS is business-critical.