dbp/relay-dispatch-bundle
Symfony bundle providing the Relay Dispatch API backend. Works with the Dispatch Frontend app, offering endpoints and services for dispatch workflows. Includes docs, changelog, and CI-tested code for integrating dispatch features into your Relay setup.
HttpClient), which Laravel supports via symfony/http-client and doctrine/dbal. Potential friction:
DependencyInjection vs. Laravel’s Service Providers.EventDispatcher vs. Laravel’s Events.aws-sdk-php) can bridge gaps if using external storage.DualDeliveryClientInterface) for mocking/testing.ROLE_GROUP_WRITER, etc.) may clash with Laravel’s built-in auth (e.g., Gate, Policy). Risk:
Voter system with Laravel’s auth.GROUPS attribute query on every request).Authenticator or middleware be needed?status-request, etc.) critical, or can they be replaced with Laravel queues (e.g., dispatch:status-poll)?blob_base_url config?DualDeliveryService to avoid hitting production endpoints in CI?GROUPS attribute scale with many groups/users? Is caching (e.g., Laravel’s Cache facade) viable?dbp_relay_dispatch_*).Http facade or Guzzle.DeliveryStatusChange) with minimal adapters.php-soap (Laravel-compatible) or a modern alternative like ext-soap with a facade.Storage facade can wrap the bundle’s blob logic if using external storage.composer require dbp/relay-dispatch-bundle.php artisan vendor:publish --tag=dbp_relay_dispatch_config.config/packages/dbp_relay_dispatch.yaml with Laravel env vars (e.g., DATABASE_URL, SERVICE_URL).php artisan dbp:relay:dispatch:migrate --em=dbp_relay_dispatch_bundle
AuthServiceProvider to map Symfony roles to Laravel gates/policies:
// app/Providers/AuthServiceProvider.php
public function boot(): void {
Gate::define('ROLE_GROUP_WRITER', function (User $user, string $groupId) {
return $this->bundleAuth->hasRole($user, 'ROLE_GROUP_WRITER', $groupId);
});
}
// routes/api.php
Route::prefix('dispatch')->group(function () {
\Symfony\Bundle\FrameworkBundle\Controller\AbstractController::class,
'dispatch_bundle_controller',
'index'
});
auth:sanctum) to gate routes.// app/Console/Commands/PollDeliveryStatus.php
public function handle() {
$dispatcher = app(DualDeliveryDispatcher::class);
$dispatcher->pollStatuses();
}
artisan or manually in code:
PollDeliveryStatus::dispatch();
Container to bind Symfony services:
$this->app->bind(DualDeliveryService::class, function ($app) {
return new DualDeliveryService(
$app['config']['dbp_relay_dispatch.service_url'],
$app['http.client']
);
});
EventServiceProvider:
protected $listen = [
\Dbp\RelayDispatchBundle\Event\DeliveryStatusChangeEvent::class => [
\App\Listeners\LogDeliveryStatus::class,
],
];
MockHttp or a test double:
$this->mock(HttpClient::class)->shouldReceive('request')->andReturn(...);
schedule:run).CHANGELOG.md. Risk: SOAP spec updates may require bundle forks.http-foundation).migrate integration). Risk of schema drift if not tracked.file_storage=database (blobs in DB tables).cert, cert_password) must be managed via Laravel’s .env or secrets system.config:cache support for the bundle’s YAML.DebugBundle vs. Laravel’s Tinker).dispatch:request-file-missing) should map to Laravel’s HttpException or a custom DispatchException.How can I help you explore Laravel packages today?