digitalnoise/command-launcher-bundle
Illuminate\Bus\Dispatcher) mirrors Messenger’s structure, making integration feasible with minimal abstraction layers.symfony/messenger. For Laravel, requires:
league/container or custom wrapper) to interface with Laravel’s Bus/Queue.Message vs. Laravel’s ShouldQueue interfaces).symfony console), which can be adapted in Laravel via:
symfony/process) to invoke Symfony CLI from Laravel.Message/Handler separation, requiring custom adapters.Events system differs from Messenger’s pub/sub model; may need middleware to translate between them.Console component in Laravel tests.Why CLI Over HTTP/Queue?
Message Bus Alignment
Illuminate\Contracts\Queue\ShouldQueue) that need translation?Failure Modes
Scaling Implications
Maintenance Burden
queue:work, schedule:run) that reduce dependency on this bundle?symfony/flex recipes).CommandLauncherBundle's CommandLauncher.symfony/process to invoke Symfony CLI from Laravel Artisan commands.// app/Console/Commands/DispatchMessage.php
use Symfony\Component\Process\Process;
public function handle() {
$process = new Process(['symfony', 'command-launcher', 'dispatch', 'ActivateUserMessage']);
$process->run();
}
class LaravelToMessengerAdapter
{
public function dispatchToMessenger($laravelJob) {
$message = $this->jobToMessage($laravelJob);
$launcher = new CommandLauncher();
$launcher->dispatch($message);
}
}
CommandLauncherBundle.// app/Services/CommandLauncher.php
class CommandLauncherService
{
public function dispatch($message) {
$process = new Process(['symfony', 'command-launcher', 'dispatch', get_class($message)]);
$process->run();
}
}
| Component | Symfony | Laravel | Mitigation |
|---|---|---|---|
| Message Bus | Symfony Messenger | Illuminate\Bus\Dispatcher | Adapter layer or custom transport |
| CLI Tooling | Symfony CLI | Artisan | symfony/process wrapper |
| Serialization | Symfony Serializer | Laravel’s native or spatie/array-to-object |
Standardize message DTOs |
| Dependency Injection | Symfony DI | Laravel Container | Use league/container for compatibility |
| Event System | Messenger Events | Laravel Events | Middleware to translate between systems |
Symfony\Component\Messenger\Message base class).digitalnoise/command-launcher-bundle (Symfony) or its Laravel wrapper.digitalnoise/command-launcher-bundle has no activity (0 stars, 0 dependents). Risk of:
symfony/var-dumper for CLI debugging.queue:failed table for failed dispatches.queue:failed unless adapted.symfony messenger:consume).How can I help you explore Laravel packages today?