- Can I use this package directly in Laravel without Symfony’s Notifier?
- No, this package requires Symfony’s Notifier component, which isn’t native to Laravel. You’d need to create a facade or adapter to bridge Symfony’s `Transport` and `Message` abstractions with Laravel’s queue/event system. Start with a proof-of-concept to test feasibility.
- How do I configure GatewayAPI in Laravel using the DSN format?
- Set the `GATEWAYAPI_DSN` environment variable in `.env` as `gatewayapi://TOKEN@default?from=FROM`, where `TOKEN` is your OAuth token and `FROM` is the sender ID. Laravel’s `.env` loader will parse this, but you’ll need a custom service provider to inject Symfony’s `GatewayApiTransport` into Laravel’s container.
- Will this package conflict with Laravel’s dependencies (e.g., Guzzle, Symfony HTTP Client)?
- Yes, potential conflicts exist. Use Composer’s `replace` directive to avoid version clashes or isolate dependencies in a separate microservice. Test thoroughly with `composer check-platform-reqs` to catch issues early.
- Does this support Laravel’s queue system for delayed SMS delivery?
- Indirectly—Symfony’s Notifier uses its own transport layer, not Laravel’s queues. You’d need to wrap the `GatewayApiTransport` in a Laravel queue job (e.g., `Bus::dispatch()`) to leverage Laravel’s delayed jobs, retries, and failed job handling.
- What Laravel versions does this package officially support?
- This package doesn’t natively support Laravel; it’s Symfony-centric. However, you could adapt it for Laravel 8.x–10.x by creating a custom service provider and facade. Test compatibility with Symfony’s pinned versions (e.g., ^7.4) to avoid breaking changes.
- Are there alternatives to this package for Laravel + GatewayAPI?
- Yes: Use Laravel’s `HttpClient` with GatewayAPI’s REST API directly, or check for a dedicated Laravel package (e.g., `spatie/laravel-gatewayapi`). These avoid Symfony dependencies but may lack built-in retry logic or OAuth2 handling.
- How do I handle webhook callbacks from GatewayAPI in Laravel?
- Configure the `callbackUrl` in `GatewayApiOptions` to point to a Laravel route. Use Laravel’s middleware (e.g., `signed`, `throttle`) to validate and process callbacks. For async handling, dispatch a Laravel event or queue a job.
- Will this package work with Laravel’s notifications system (e.g., `Notifiable` interfaces)?
- No, not natively. You’d need to extend Laravel’s `Mailable` or create a custom notification channel that delegates to Symfony’s `GatewayApiTransport`. This requires significant boilerplate to align Symfony’s message structure with Laravel’s notification contracts.
- How do I test SMS sending in a Laravel CI pipeline using this package?
- Mock Symfony’s `GatewayApiTransport` in your tests using PHPUnit or Pest. Replace the real transport with a test double that validates `SmsMessage` payloads. For integration tests, use Laravel’s `Queue::fake()` to simulate queued SMS delivery.
- Is this package actively maintained, and what’s the roadmap for Laravel support?
- As of May 2026, this is a Symfony-focused package with no official Laravel roadmap. Maintenance depends on community contributions. For Laravel-specific needs, consider forking the repo or building a lightweight wrapper around GatewayAPI’s REST API.