dcs/password-reset-persistence-orm-bundle
Bundle structure vs. Laravel’s ServiceProvider/Package model).doctrine/orm. The core functionality (persisting password reset tokens) aligns with Laravel’s built-in Illuminate\Auth\Passwords\PasswordBroker but offers customizable storage (e.g., tracking metadata like IP, user agent).spatie/laravel-symfony).doctrine/dbal + doctrine/orm).symfony/dependency-injection, symfony/http-foundation).PasswordReset table structure differs from the bundle’s assumed schema. Migration strategy needed to align or extend tables.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony-Laravel Gap | High | Abstract bundle logic via Laravel services. |
| Schema Mismatch | Medium | Custom migrations or entity overrides. |
| Maintenance Overhead | Medium | Monitor for Symfony updates; test compatibility. |
| Performance | Low | Benchmark against Laravel’s default storage. |
Password::createToken()?
symfony/... components interact with Laravel’s service container?Request → Illuminate\Http\Request)?spatie/laravel-activitylog for audit trails)?created_at, expires_at, ip_address).spatie/laravel-symfony) where bundle integration is seamless.PasswordBroker vs. bundle’s PasswordReset entity).user_agent, reset_count) and map to bundle’s schema.ServiceProvider to expose Symfony services as Laravel bindings.
// Example: Register Symfony Bundle in Laravel
$this->app->register(SymfonyBundleAdapter::class);
Symfony\Component\HttpFoundation\Request → Illuminate\Http\Request).password_resets table or create a new table matching the bundle’s PasswordReset entity.Schema::create('password_resets', function (Blueprint $table) {
$table->id();
$table->string('email')->index();
$table->string('token');
$table->ipAddress('ip_address')->nullable();
$table->text('user_agent')->nullable();
$table->timestamps();
});
PasswordBroker with a custom implementation that delegates to the bundle’s PasswordResetManager.// app/Providers/AuthServiceProvider.php
public function boot()
{
$this->app->bind(\Illuminate\Contracts\Auth\PasswordBroker::class, function ($app) {
return new CustomPasswordBroker(
$app->make(SymfonyBundleAdapter::class)
);
});
}
| Component | Laravel Equivalent | Compatibility Notes |
|---|---|---|
| Symfony Bundle | Laravel ServiceProvider/Package | Requires abstraction or fork. |
| Doctrine ORM | doctrine/orm |
Native support; no issues. |
| Symfony DI Container | Laravel Container | May need symfony/dependency-injection polyfill. |
| Symfony HttpFoundation | illuminate/http |
Replace Request/Response classes. |
| Twig (if used) | Blade | Avoid; use Blade templates instead. |
PasswordReset entity.doctrine/orm, symfony/dependency-injection, and bundle via Composer.PasswordBroker with custom implementation.ip_address, user_agent, etc.Whoops or Sentry with custom error formatting.PasswordResetManager may be hard to migrate away.password_resets table.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Database downtime | Password resets fail | Fallback to file-based storage. |
| Schema migration errors | Broken reset flows | Rollback scripts + testing. |
| Symfony dependency conflicts | Application crashes | Isolate bundle in a micro-service. |
| Token collision (race condition) | Duplicate/reset conflicts | Use Laravel’s createToken() + bundle metadata. |
How can I help you explore Laravel packages today?