common-gateway/zds-to-zgw-bundle
symfony/http-foundation and symfony/console packages enable partial integration.Package Development and Service Providers.commongateway:install command implies schema management. Laravel’s migrations or Doctrine DBAL can handle this, but custom logic may be needed for dynamic schema registration.ContainerBuilder in Laravel’s Container).ServiceProvider to replicate this behavior (e.g., scanning vendor/ for plugin classes).ZDS-to-ZGW logic is framework-agnostic).Scope of Extension:
Artisan commands?Symfony Dependency Tolerance:
EventDispatcher, HttpFoundation, or Console components, or must integration be minimal?spatie/laravel-package-tools) that reduce Symfony bloat?Schema/Database Integration:
commongateway:install) interact with Laravel’s migration system? Will dynamic schema registration be needed?spatie/laravel-schema-dumper) that can replace this functionality?Performance Impact:
Long-Term Maintenance:
| Laravel Component | Bundle Equivalent/Integration Path | Compatibility Notes |
|---|---|---|
| Service Providers | Symfony Bundle classes |
Wrap Symfony bundles in Laravel ServiceProvider with register()/boot() methods. |
| Middleware | Symfony EventSubscriber or HttpKernel middleware |
Convert to Laravel middleware or use Kernel::terminate() hooks. |
| Artisan Commands | Symfony Command classes |
Extend Illuminate\Console\Command or use Symfony’s Application via a facade. |
| Routing | Symfony Routing component |
Use Laravel’s router or bridge Symfony’s Router via symfony/routing. |
| Dependency Injection | Symfony Container |
Prefer Laravel’s container; use symfony/dependency-injection sparingly. |
| Migrations | commongateway:install command |
Replace with Laravel migrations or use DoctrineMigrationsBundle for hybrid support. |
| Plugin Discovery | Admin UI or composer.json |
Implement a PluginServiceProvider scanning vendor/ for classes with @Plugin tags. |
Assessment Phase:
ZdsToZGWTransformer) for Symfony dependencies. Identify framework-agnostic logic.symfony/skeleton) to validate functionality before Laravel integration.Hybrid Integration (Minimal Symfony):
composer require symfony/console symfony/http-foundation symfony/dependency-injection
SymfonyBridgeServiceProvider to expose Symfony services to Laravel:
use Symfony\Component\HttpKernel\Kernel;
class SymfonyBridgeServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton(Kernel::class, function () {
return new Kernel(env('APP_ENV'), false);
});
}
}
commongateway:install command as a Laravel Artisan command:
use Illuminate\Console\Command;
class InstallPluginCommand extends Command {
protected $signature = 'commongateway:install {package}';
public function handle() {
// Use Composer API or Symfony’s Installer to register schemas.
}
}
Full Laravel Port (Advanced):
Bundle → ServiceProvider, EventDispatcher → Laravel events).spatie/laravel-package-tools to standardize plugin development.Bundle classes may conflict with Laravel’s App\ namespace. Use unique prefixes (e.g., CommonGateway\).autoload_dev.php may not work in Laravel. Use composer dump-autoload or psr-4 in composer.json.config/packages/ may need conversion to Laravel’s config/ structure.Phase 1: Proof of Concept (2–4 weeks)
Phase 2: Framework Abstraction (3–6 weeks)
laravel-zds-zgw) to abstract the bundle for Laravel teams.Phase 3: Production Rollout (2–3 weeks)
ZdsTransformerInterface in Laravel").EventDispatcher may behave differently than Laravel’s events.composer why-not to track Symfony dependencies.docs/laravel-integration.md) covering:
How can I help you explore Laravel packages today?