ldc-boutique-cnc-sable/app/Providers/DomainServiceProvider.php
Jérémy Munsch 3b3997d547
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-27 09:58:44 +01:00

130 lines
3.9 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Providers;
use Domain\Ports\Directories\CodeDirectory;
use Domain\Ports\Directories\ShopDirectory;
use Domain\Ports\Repositories\BasketRepository;
use Domain\Ports\Repositories\OrderRepository;
use Domain\Ports\Repositories\PickupExceptionRepository;
use Domain\Ports\Repositories\ProductRepository;
use Domain\Ports\Repositories\ShopperRepository;
use Domain\Ports\Repositories\ShopRepository;
use Domain\Ports\Services\AdminAuthenticationService;
use Domain\Ports\Services\CustomerAuthenticationService;
use Domain\Ports\Services\EmployeeImportStorageService;
use Domain\Ports\Services\EmployeeStatisticsService;
use Domain\Ports\Services\TransactionManager;
use Domain\Ports\Services\UuidConverter;
use Illuminate\Support\ServiceProvider;
use Infrastructure\Adapters\Directories\EloquentCodeDirectory;
use Infrastructure\Adapters\Directories\EloquentShopDirectory;
use Infrastructure\Adapters\Events\LaravelDomainEventDispatcher;
use Infrastructure\Adapters\Repositories\EloquentOrderRepository;
use Infrastructure\Adapters\Repositories\EloquentPickupExceptionRepository;
use Infrastructure\Adapters\Repositories\EloquentProductRepository;
use Infrastructure\Adapters\Repositories\EloquentShopperRepository;
use Infrastructure\Adapters\Repositories\EloquentShopRepository;
use Infrastructure\Adapters\Repositories\SessionBasketRepository;
use Infrastructure\Adapters\Services\AppAdminAuthService;
use Infrastructure\Adapters\Services\AppCustomerAuthService;
use Infrastructure\Adapters\Services\EloquentEmployeeImportStorageService;
use Infrastructure\Adapters\Services\EloquentEmployeeStatisticsService;
use Infrastructure\Adapters\Services\LaravelTransactionManager;
use Infrastructure\Adapters\Services\UuidConverterImpl;
use Shared\DDD\DomainEventDispatcher;
class DomainServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
#[\Override]
public function register(): void
{
$this->app->singleton(
DomainEventDispatcher::class,
LaravelDomainEventDispatcher::class
);
$this->app->bind(
OrderRepository::class,
EloquentOrderRepository::class
);
$this->app->bind(
PickupExceptionRepository::class,
EloquentPickupExceptionRepository::class
);
$this->app->bind(
ShopperRepository::class,
EloquentShopperRepository::class
);
$this->app->bind(
ShopRepository::class,
EloquentShopRepository::class
);
$this->app->bind(
EmployeeStatisticsService::class,
EloquentEmployeeStatisticsService::class
);
$this->app->bind(
ShopDirectory::class,
EloquentShopDirectory::class
);
$this->app->bind(
AdminAuthenticationService::class,
AppAdminAuthService::class
);
$this->app->bind(
CustomerAuthenticationService::class,
AppCustomerAuthService::class
);
$this->app->bind(
ProductRepository::class,
EloquentProductRepository::class
);
$this->app->bind(
BasketRepository::class,
SessionBasketRepository::class
);
$this->app->bind(
TransactionManager::class,
LaravelTransactionManager::class
);
$this->app->bind(
CodeDirectory::class,
EloquentCodeDirectory::class
);
$this->app->bind(
EmployeeImportStorageService::class,
EloquentEmployeeImportStorageService::class
);
$this->app->bind(
UuidConverter::class,
UuidConverterImpl::class
);
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}