dcs/user-persistence-orm-bundle
DCSUserCoreBundle functionality, aligning well with Laravel’s (or Symfony’s) event-driven architecture. This modular approach minimizes core logic changes.doctrine/orm package), but the bundle’s design is ORM-agnostic in principle.symfony/http-kernel or laravel/symfony-bridge to embed Symfony components.Events facade would need to proxy Symfony events (e.g., DCSUserPersistenceORMEvents) or vice versa.dcs_user.persistence.orm.repository).User entity schema (from DCSUserCoreBundle). Migrating this to Laravel’s Eloquent models would require schema alignment (e.g., using php artisan make:migration).EventDispatcher and DependencyInjection introduces friction in a Laravel stack. Risk mitigation:
Event system.README lacks details on:
Why Symfony Over Eloquent?
Event System Alignment
DCSUserPersistenceORMEvents) map to Laravel’s Events?user.created) that must be preserved?Schema Compatibility
User entity schema conflict with existing Laravel models? Example: Does it use Symfony’s LifecycleCallbacks or Laravel’s model observers?Testing Strategy
Event facade.Long-Term Maintenance
http-kernel, dependency-injection).doctrine/orm package).laravel/symfony-bridge) for minimal overhead.Events system.DCSUserCoreBundle’s User entity to Laravel’s App\Models\User.composer require symfony/http-kernel laravel/symfony-bridge doctrine/orm
config/packages/doctrine.php (Laravel 8+ uses Symfony’s config system).config/bundles.php (Symfony) or create a Laravel service provider to bootstrap it.repository_service in config/packages/dcs_user_core.yaml:
dcs_user_core:
repository_service: dcs_user.persistence.orm.repository
// app/Listeners/SymfonyEventListener.php
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Illuminate\Support\Facades\Event;
class SymfonyEventListener {
public function __construct(EventDispatcherInterface $dispatcher) {
$dispatcher->addListener('user.persisted', function ($event) {
Event::dispatch(new UserPersisted($event->getUser()));
});
}
}
User entity schema. Example:
php artisan make:migration create_users_table --table=users
DCSUserCoreBundle’s expectations.repository->findBy(['email' => $email]) with User::where('email', $email)->get().bind() or extend() to resolve Symfony services.$this->app->bind(
'dcs_user.persistence.orm.repository',
function ($app) {
return new DCSUserORMRepository($app['doctrine']);
}
);
Illuminate\Auth\UserProvider) by implementing UserProviderInterface for the bundle’s User class.user.created) to verify translation.User entity.User entity schema to Laravel.user.deleted, user.updated).ContainerException).symfony/dependency-injection).composer.json.DCSUserORMRepository.DCSUserPersistenceORMEvents for custom logic.ParameterNotFoundException vs. BindingResolutionException.dd() or Laravel’s dump() for cross-stack debugging.DCSUserCoreBundle may limit flexibility. Example: Future Laravel auth system changes could break integration.User::all() with 10K+ users.How can I help you explore Laravel packages today?