schvoy/base-entity-bundle
Symfony bundle providing reusable Doctrine base entities (ID/UUID/ULID) and traits with common behaviors: timestampable (created/updated), soft delete, and blameable user tracking. Includes automatic listeners and configurable User class support.
HasTimestamps, SoftDeletes). Could reduce boilerplate if wrapped in a Laravel-compatible layer.LifecycleCallbacks) could be emulated in Laravel via model observers or events, but with higher friction.Bundle system, dependency injection (DI), and configuration (e.g., config/packages). Laravel’s service container and configuration are different, requiring adapters or facades.ParameterBag or Container integrations).Timestampable, SoftDeletable) and rewrite for Eloquent.SoftDeletes trait).LifecycleCallbacks) to Laravel model events.doctrine/orm + laravel-doctrine/orm for basic integration.api-platform/core for Symfony interop.symfony/dependency-injection or symfony/config may conflict with Laravel’s container. Use autoload aliases or composer patches.config/packages must be mapped to Laravel’s config/services.php or environment files.| Phase | Task | Tools/Dependencies |
|---|---|---|
| Discovery | Identify overlapping features (e.g., timestamps, UUIDs). | php artisan make:model audit |
| Adapter Layer | Create Laravel traits/facades for bundle behaviors. | Custom traits, Illuminate\Support\Facades |
| Pilot | Test 1–2 entities in a non-production environment. | Docker (Symfony + Laravel), PHPUnit |
| Feature Parity | Implement missing Symfony features (e.g., events) in Laravel. | Laravel Events, Observers |
| Performance | Compare query performance (Doctrine vs. Eloquent). | Laravel Debugbar, Blackfire |
| Rollout | Replace legacy Laravel entities incrementally. | GitHub PRs, feature flags |
vendor/bin scripts, Symfony cache).composer.json or use platform.sh for multi-framework deployments.doctrine/migrations) differ from Laravel’s. Example:
| Risk | Impact | Mitigation |
|---|---|---|
| Doctrine-Eloquent Conflict | Data corruption if both ORMs access the same tables. | Use read replicas or database sharding. |
| Event System Mismatch | Symfony events not firing in Laravel. | Implement event translators (e.g., Symfony KernelEvents → Laravel ModelEvents). |
| Configuration Drift | Symfony config/ vs. Laravel config/ conflicts. |
Use environment-based config loading. |
| Deprecation Cascade | Laravel drops PHP/Symfony support. | Monitor Upgrade Guides for both frameworks. |
| Team Burnout | High maintenance cost for limited gain. | Cost-benefit analysis before full adoption. |
How can I help you explore Laravel packages today?