baks-dev/delivery) remains a Symfony bundle, but the new release (v7.4.5) introduces explicit Laravel compatibility notes in the documentation, suggesting the authors are acknowledging the integration gap. This reduces the need for custom abstraction layers but still requires service provider binding and Doctrine-Eloquent reconciliation.transport_assigned, delivery_failed). This aligns well with Laravel’s event system and queue workers, enabling seamless integration for async processing (e.g., notifying third-party logistics providers).DeliveryEvent::TRANSPORT_ASSIGNED). These can be mapped to Laravel’s Event facade or queued jobs for scalability. The package now includes a DeliveryEventDispatcher trait, simplifying event integration.DeliveryRepositoryInterface with optional Eloquent adapter support, reducing conflict risk. Mitigation strategies updated:
spatie/laravel-doctrine-orm).DeliveryClient class in v7.4.5).LaravelServiceProvider stub in the docs, suggesting the authors expect Laravel users to extend it. This reduces DI complexity but still requires custom binding for Symfony-specific components (e.g., Console).| Risk Area | Severity | Mitigation Strategy | Update for v7.4.5 |
|---|---|---|---|
| Doctrine/Eloquent Conflict | Medium | Use DeliveryRepositoryInterface adapter or hybrid ORM. |
Lowered: Eloquent adapter now documented. |
| Symfony Dependency Injection | Medium | Extend LaravelServiceProvider stub. |
Lowered: Official provider stub included. |
| PHP 8.4+ Constraints | Low | Upgrade Laravel/PHP or containerize. | Unchanged. |
| Undocumented Features | Low | New release adds webhook docs and event mapping. | Lowered: Better event/hook documentation. |
| Bundle-Specific Artifacts | Medium | Mock baks:assets:install with Laravel’s artisan aliases. |
Unchanged: Still requires custom commands. |
DeliveryRepositoryInterface support shared schema (Laravel migrations) or require Doctrine ownership?DeliveryTransport::extend())?DeliveryEvent::dispatch() vs. Laravel’s event()).baks-dev/core actively maintained? Check if v7.4.5 includes backward-compatibility guarantees for Laravel.LaravelServiceProvider stub reduces DI complexity. Use service binding for:
// app/Providers/BaksDeliveryServiceProvider.php
public function register()
{
$this->app->singleton(DeliveryManager::class, function ($app) {
return new DeliveryManager(
$app->make(DeliveryRepositoryInterface::class), // Eloquent adapter
$app['events']
);
});
}
Http\Client or queue:work for async processing.Event::dispatch():
// Listen to transport assignment
event(new TransportAssigned($orderId));
Laravel App
├── Service Layer (Adapters for baks-dev/delivery)
│ ├── DeliveryService (Facade)
│ ├── TransportRepository (Eloquent Adapter)
│ ├── WebhookListener (Laravel Event Listener)
├── Console (Artisan Commands)
│ ├── BaksAssetsInstallCommand (Wrapper)
├── Events
│ ├── DeliveryEventServiceProvider (Maps Symfony events)
├── Http (Webhook Endpoints)
│ ├── DeliveryWebhookController
Phase 1: Proof of Concept (2 weeks)
baks-dev/delivery:^7.4.5 and test core workflows (e.g., transport assignment).DeliveryEvent::TRANSPORT_ASSIGNED).Phase 2: Abstraction Layer (3 weeks)
LaravelServiceProvider stub to bind Symfony services.Delivery::assignTransport()) and event listeners.// app/Providers/EventServiceProvider.php
protected $listen = [
'baks.delivery.transport_assigned' => [
DeliveryAssignedListener::class,
],
];
Phase 3: Full Integration (4 weeks)
/api/delivery/webhook) using Laravel’s Route::post().| Component | Laravel Equivalent/Adapter | Notes |
|---|---|---|
| Symfony Container | LaravelServiceProvider stub |
Bind DeliveryManager and repositories. |
| Doctrine ORM | DeliveryRepositoryInterface (Eloquent) |
Use adapter or hybrid ORM. |
| Console Commands | Artisan Commands | Extend Illuminate\Console\Command. |
| Event System | Laravel Events + Queue Workers | Map baks.delivery.* events. |
| Webhooks | Laravel HTTP Client / Queue Workers | Process async delivery updates. |
| Config Files | Laravel Config (config/delivery.php) |
Publish via vendor:publish. |
doctrine/dbal and symfony/console if missing.LaravelServiceProvider.DeliveryRepository).php artisan vendor:publish --provider="BaksDeliveryServiceProvider".doctrine:migrations:migrate via DBAL or Laravel’s migrate).baks-dev/delivery for breaking changes in event names or webhook schemas.vendor:publish.config/delivery.php:
return [
'webhooks' => [
'enabled' => env('DELIVERY_WEBHOOKS_ENABLED', true),
'queue' => 'delivery_webhooks',
],
];
monolog using a log channel adapter:
// app/Providers/AppServiceProvider.php
How can I help you explore Laravel packages today?