alexgeno/phone-verification-bundle
\AlexGeno\PhoneVerification\Storage\I) and custom SMS senders (via \AlexGeno\PhoneVerification\Sender\I), enabling tailored implementations for niche use cases.MIGRATIONS.md). Better for stateful or audit-heavy applications.alexgeno/phone-verification-php library (a dependency) is PHP 8.0+ agnostic, suggesting potential for Laravel adaptation (e.g., via a facade or custom bridge).snc/redis-bundle and predis/predis.doctrine/mongodb-odm-bundle.symfony/twilio-notifier)..env variables, which may introduce boilerplate in Laravel’s .env-centric workflow.mongosh scripts required).PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_PERIOD_SECS, which may conflict with custom expiration logic in Laravel sessions.Laravel\SymfonyBridge).spatie/laravel-symfony).alexgeno/phone-verification-php (the core library) directly in Laravel, bypassing the Symfony bundle.laravel-notification-channels/twilio).// Laravel Service Provider
$this->app->singleton(\AlexGeno\PhoneVerification\Storage\I::class, function ($app) {
return new LaravelRedisStorage($app['redis']);
});
symfony/ux-live-component or a separate API).alexgeno/phone-verification-php:
namespace App\Services;
use AlexGeno\PhoneVerification\Manager\Initiator;
use AlexGeno\PhoneVerification\Storage\I;
class PhoneVerifier {
public function __construct(
private Initiator $initiator,
private I $storage
) {}
public function sendOtp(string $phone): bool {
return $this->initiator->initiate($phone);
}
}
| Component | Compatibility | Mitigation |
|---|---|---|
| Symfony Notifier | Requires Symfony 6.x Notifier bundles (e.g., symfony/twilio-notifier). |
Use Laravel’s equivalent (e.g., laravel-notification-channels/twilio). |
| Redis/MongoDB | Works with Laravel’s Redis/MongoDB drivers but may need custom storage adapters. | Implement AlexGeno\PhoneVerification\Storage\I for Laravel’s DB/Redis. |
| Routing | Symfony’s annotated routes vs. Laravel’s resource routes. | Expose as API endpoints (e.g., /api/verify/send, /api/verify/validate). |
| Events | Bundle lacks Laravel events (e.g., Verified, Failed). |
Decorate services to dispatch Laravel events. |
| Testing | Symfony’s TestPack vs. Laravel’s Pest/PHPUnit. |
Use mockery or php-mock for unit tests. |
Log facade).laravel-telemetry).spatie/laravel-slack-notification).How can I help you explore Laravel packages today?