common-gateway/zgw-to-zds-bundle
spatie/laravel-package-tools).illuminate/container).symfony/http-foundation for request/response handling.spatie/laravel-package-tools).bind() to resolve Symfony services.php-di/php-di as a middle layer).commongateway:install command requires a Laravel equivalent (e.g., custom Artisan command or Migrations).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony-Laravel DI Gap | High | Abstract dependencies via interfaces/facades. |
| Plugin Discovery UI | Medium | Replace Symfony admin UI with Laravel Nova/Inertia.js. |
| Schema Migration Tool | Medium | Build a custom Artisan command or use Laravel Migrations. |
| Protocol-Specific Logic | Low | Test ZGW/ZDS compliance via Laravel HTTP tests. |
package:update)?Laravel Compatibility Matrix:
| Laravel Feature | Symfony Equivalent | Integration Path |
|---|---|---|
| Service Providers | Symfony Bundles | Convert bundles to Laravel packages. |
| Middleware | Symfony Middleware | Use Laravel’s Kernel::pushMiddleware(). |
| Routing | Symfony Routing | Map Symfony routes to Laravel routes. |
| Dependency Injection | Symfony DI Container | Use Laravel\Container or php-di. |
| Events | Symfony EventDispatcher | Bridge to Laravel Events. |
| CLI Commands | Symfony Console Commands | Replace with Artisan commands. |
Recommended Tech Stack:
symfony/console-bridge for CLI, symfony/http-client for HTTP.spatie/laravel-package-tools to scaffold Laravel-compatible plugins.pestphp/pest for PHP unit/feature tests.Phase 1: Dependency Mapping
composer.json for Symfony dependencies.symfony/validator → laravel/validator).Symfony\Component\HttpFoundation\Request → Illuminate\Http\Request).Phase 2: Container Abstraction
// Example: Bind Symfony's EventDispatcher to Laravel's
$this->app->bind(
\Symfony\Contracts\EventDispatcher\EventDispatcherInterface::class,
\Illuminate\Events\Dispatcher::class
);
SchemaManager).Phase 3: Plugin System
commongateway:install:
php artisan zgw:install common-gateway/pet-store-bundle
vendor/.Phase 4: Protocol Integration
// Symfony (original)
class PetStoreController extends AbstractController {
public function index(EventDispatcherInterface $dispatcher): Response
}
// Laravel (adapted)
class PetStoreController extends Controller {
public function index(EventDispatcher $dispatcher) { ... }
}
PetStoreBundle) to Laravel.symfony/console vs. Laravel’s psr/log).replace to avoid duplicate packages.^6.0).laravel-zgw-bridge).Symfony\Bridge\Laravel\Context::class).Symfony\Component\DependencyInjection\ContainerInterface).How can I help you explore Laravel packages today?