PHP code example of alexandrebulete / ddd-outbox-bundle

1. Go to this page and download the library: Download alexandrebulete/ddd-outbox-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alexandrebulete / ddd-outbox-bundle example snippets


// Routed to `async`. Not a CommandInterface: those are routed to `sync`.
final readonly class SendMissionReport
{
    public function __construct(public string $missionId, public string $step) {}
}

// In the handler of the action — inside its transaction:
$this->commandBus->dispatch(new SendMissionReport($missionId, $step));