antishov/doctrine-extensions-bundle
Pros:
Slugable, Loggable, Translatable, Uploadable, SoftDeleteable, Tree, NestedSet) for Symfony 4/5, aligning with Laravel-like ORM behaviors but in a PHP/Symfony context.doctrine/dbal or illuminate/database).Storage facade but at the entity level).Loggable) mirror Laravel’s SoftDeletes and manual logging patterns.Cons:
stof/doctrine-extensions-bundle), introducing potential hidden bugs or deprecated dependencies.laravel-doctrine/orm).HttpFoundation, Console) or Laravel’s Symfony bridge (laravel/symfony-bundle).File or Storage logic for entity-bound files.Loggable) may conflict with Laravel’s model observers or events.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Archived Package | High | Fork/rebase on GitHub; monitor for forks. |
| Doctrine vs. Eloquent | Medium | Use Doctrine Bridge (voku/portable-utf8, doctrine/dbal) or hybrid setup. |
| Symfony DI Conflicts | Medium | Isolate bundle in a micro-service or use Laravel’s Symfony integration. |
| Uploadable Paths | Low | Validate against Laravel’s storage_path() or public_path(). |
| PHP 8+ Compatibility | Low | Test with Laravel’s PHP 8.1+ support. |
ServiceProvider)?Loggable/Uploadable impact Laravel’s query builder or migrations?spatie/laravel-activitylog, spatie/laravel-medialibrary) replace functionality?laravel-doctrine/orm or illuminate/database polyfill).HttpKernel for web routes or Console for Artisan-like commands.Str::slug() with entity-level slug generation.storage/app/uploads with entity metadata.logs table or use spatie/laravel-activitylog.SoftDeletes with Doctrine’s LifecycleEventArgs.Phase 1: Proof of Concept
vendor/bin/symfony CLI).EntityManager setup).Storage facade.Phase 2: Hybrid Integration
StofDoctrineExtensionsBundle.// app/Providers/DoctrineExtensionsServiceProvider.php
namespace App\Providers;
use Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle;
class DoctrineExtensionsServiceProvider extends \Illuminate\Support\ServiceProvider {
public function register() {
$this->app->register(StofDoctrineExtensionsBundle::class, 'all');
}
}
ModelSaved).Phase 3: Full Adoption
File logic with Uploadable extension.ParameterBag for config (map to Laravel’s .env).| Laravel Feature | Bundle Equivalent | Integration Notes |
|---|---|---|
| Eloquent Models | Doctrine Entities | Use DoctrineExtensionsBundle::getEntityManager(). |
| Migrations | Doctrine Migrations | Run via php bin/console doctrine:migrations:execute. |
| File Uploads | Uploadable Extension | Store paths in storage/app/uploads. |
| Model Observers | Doctrine Lifecycle Callbacks | Replace observers with prePersist(). |
| Query Scopes | Doctrine QueryBuilder | Use createQueryBuilder() instead of scope(). |
| Artisan Commands | Symfony Console Commands | Register via app/Console/Kernel.php. |
storage/app.SoftDeletes trait.HttpKernel for CLI-only features).monolog.OnFlush) require familiarity with Symfony’s EventDispatcher.Event → Laravel’s ModelEvent").save() operations (test with tntsearch/laravel-profiler).Storage queue.How can I help you explore Laravel packages today?