elao/rest-action-bundle
Symfony bundle adding ready-to-use REST actions (CRUD plus listing) designed to integrate with ElaoAdminBundle. Install via Composer, register the bundle, and configure the serializer (e.g., JMS) to quickly expose admin-friendly REST endpoints.
elao/rest-action-bundle is a Symfony2/Doctrine2-specific extension for the elao/admin-bundle, providing RESTful CRUD actions (e.g., create, update, delete, list). It targets legacy Symfony2 applications (last updated in 2015) and is tightly coupled to the elao/admin-bundle ecosystem.make:controller --api) eliminates boilerplate.EventDispatcher, Templating, and Routing components (absent in Laravel).elao/admin-bundle’s internal API (undocumented, no Laravel equivalent).Action/DeleteAction) as inspiration for Laravel’s resource controllers or API middleware.BulkAction logic into Laravel’s queue-based jobs or batch processing (e.g., Laravel Nova bulk actions).Form Request validation.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Deprecated Dependencies | High | Avoid direct use; extract patterns only. |
| Symfony2-Specific Abstractions | High | Replace with Laravel equivalents (e.g., Route::apiResource()). |
| ORM Mismatch | Medium | Use Eloquent events (saved, deleted) instead of Doctrine listeners. |
| UI Tight Coupling | Low | Focus on backend logic; ignore frontend templates. |
Why Reimplement?
spatie/laravel-permission or laravel-api-resource?SoftDeleteAction inspire a Laravel package for soft-deletes with audit logs?Performance Tradeoffs
Laravel Query Builder chunking.Laravel Scout for search-heavy actions.Maintenance Overhead
Team Alignment
| Laravel Component | Bundle Equivalent | Integration Strategy |
|---|---|---|
| API Resources | Manual serialization | Replace bundle’s serialize() logic with ApiResource. |
| Route Model Binding | Custom Action classes |
Use Laravel’s implicit binding (Route::apiResource). |
| Middleware | Symfony filters | Convert Action filters to Laravel middleware. |
| Validation | Symfony Validator |
Migrate to Form Request validation. |
| Events | Doctrine listeners | Use Eloquent model events (observables). |
Phase 1: Pattern Extraction (Low Risk)
CreateAction, ListAction).CreateAction → Store method in ApiController.ListAction → index() with ApiResource pagination.phpstan to analyze type hints for pattern clues.Phase 2: Selective Reimplementation (Medium Risk)
// Bundle’s BulkDeleteAction → Laravel Job
class BulkSoftDeleteJob implements ShouldQueue {
use Dispatchable, InteractsWithQueue;
public function handle() {
Model::whereIn('id', $this->ids)->update(['deleted_at' => now()]);
}
}
Laravel Pint to enforce consistent coding standards.Phase 3: UI Decoupling (High Risk, Optional)
use Doctrine\ORM\Event\LifecycleEventArgs;
class SoftDeleteListener {
public function preRemove(LifecycleEventArgs $args) { ... }
}
elao/rest-action-bundle dependencies. Drop Symfony-specific ones (e.g., symfony/swiftmailer).Create, Delete) in Laravel to validate patterns.tightenco/ziggy for REST routes).BulkAction in Laravel").make:controller --api) eliminate manual action classes.Laravel Forge/Envoyer for deployments vs. Symfony2’s sensio/distribution-bundle.EventDispatcher logs differ from Laravel’s. Use Laravel Debugbar for consistency.Pest or PHPUnit with Mockery.chunk() or cursor() may outperform Doctrine’s batch loading for large datasets.Laravel Cache (Redis/Memcached) instead of Symfony’s HttpCache.BulkDeleteAction → BulkDeleteJob).Laravel Dusk or k6 to validate under load.| Failure Scenario | Mitigation |
|---|---|
| Action Class Mismatch | Use Laravel’s Route::controller() to map bundle actions to Laravel methods. |
| ORM Event Conflicts | Prefix event listeners (e.g., elao_soft_delete). |
| Deprecated Symfony Features | Abstract behind adapters (e.g., SymfonyValidatorAdapter). |
| UI Integration Breakage |
How can I help you explore Laravel packages today?