aescarcha/business
Symfony bundle providing REST endpoints for managing businesses, with JSON responses and API docs support. Integrates FOSRestBundle, FOSUserBundle, JMS Serializer, NelmioApiDoc, Doctrine extensions, and distance-based business querying.
friendsofsymfony/rest-bundle, jms/serializer), many of which are Symfony-centric and redundant in Laravel (e.g., Laravel already includes a serializer via Illuminate\Support\Str or spatie/array-to-xml).laravel/api-resources, spatie/laravel-fractal) may clash with the bundle’s league/fractal or jms/serializer implementations.Illuminate/Authentication.Route::apiResource).SoftDelete, Sluggable) have Eloquent equivalents (Illuminate\Database\Eloquent\SoftDeletes, spatie/laravel-sluggable), but migrating behavior could introduce edge cases.Why Not Use Laravel Native Tools?
laravel/breeze or laravel/jetstream.Dependency Justification
friendsofsymfony/rest-bundle or nelmio/api-doc absolutely required, or can they be replaced with:
Route::apiResource + spatie/laravel-api-resources?darkaonline/l5-swagger for API docs?Long-Term Viability
spatie/laravel-permission for role-based business access)?Migration Path
AppKernel.php or Symfony-specific services (e.g., ContainerAware traits).Illuminate/Authentication has a different contract (e.g., User model extends Illuminate\Foundation\Auth\User vs. FOS’s BaseUser).league/fractal could theoretically work in Laravel, but conflicts may arise with Laravel’s native JSON responses or spatie/laravel-fractal.FOS\RestBundle can be replaced with laravel/api-resources or manual controllers.// Symfony (Doctrine)
// src/Aescarcha/Bundle/BusinessBundle/Entity/Business.php
// →
// Laravel (Eloquent)
// app/Models/Business.php
// Symfony (FOSRest)
// src/Aescarcha/Bundle/BusinessBundle/Controller/BusinessController.php
// →
// Laravel
// app/Http/Controllers/BusinessController.php (using Route::apiResource)
laravel/breeze).jms/serializer with Laravel’s native JSON or spatie/laravel-fractal.friendsofsymfony/rest-bundle, nelmio/api-doc, and stof/doctrine-extensions-bundle in favor of Laravel-native solutions.league/fractal if serialization logic is complex).ContainerAware services won’t work in Laravel. Replace with Laravel’s service containers or bindings.EventDispatcherInterface) differs from Laravel’s Illuminate/Events. Rewrite event listeners.Assert\Email) may need replacement with Laravel’s Illuminate/Validation.| Phase | Task | Tools/Libraries |
|---|---|---|
| 1. Feature Audit | Document bundle’s business logic, API endpoints, and dependencies. | composer why |
| 2. Model Port | Convert Doctrine entities to Eloquent models. | laravel/model:make |
| 3. Auth Rewrite | Replace FOSUser with Laravel’s auth (e.g., Sanctum). | laravel/sanctum |
| 4. API Layer | Rewrite controllers using Laravel’s API resources. | spatie/laravel-api-resources |
| 5. Serialization | Replace JMS/League Fractal with Laravel’s native JSON or Fractal. | spatie/laravel-fractal |
| 6. Testing | Validate functionality with PHPUnit/Laravel’s testing tools. | laravel/pint, phpunit/phpunit |
| 7. Deprecation | Remove Symfony-specific bundles (e.g., FOSRestBundle). |
composer remove |
league/fractal or stof/doctrine-extensions for partial functionality adds unnecessary complexity to the Laravel stack.FOSRestBundle’s global request/response transformations could conflict with Laravel’s middleware pipeline.How can I help you explore Laravel packages today?