feat: replace *Service suffix with role-based class names

This commit is contained in:
Björn Fromme
2026-04-16 13:34:54 +02:00
parent 0d2cc5b998
commit d1c92f2957
88 changed files with 435 additions and 435 deletions
@@ -12,8 +12,8 @@ use App\Form\Model\BankAccountDto;
use App\Form\Model\BookingDto;
use App\Form\Model\ParticipantDto;
use App\Form\Model\RoomSelectionDto;
use App\Service\BookingPriceCalculatorService;
use App\Service\InsuranceService;
use App\Service\BookingPriceCalculator;
use App\Service\InsuranceManager;
/**
* Processes booking form data and converts it into BusProNet API payload format.
@@ -25,8 +25,8 @@ use App\Service\InsuranceService;
class BookingDataProcessor
{
public function __construct(
private readonly InsuranceService $insuranceService,
private readonly BookingPriceCalculatorService $priceCalculatorService,
private readonly InsuranceManager $insuranceService,
private readonly BookingPriceCalculator $priceCalculatorService,
private readonly ServiceMappingCollector $mappingCollector,
private readonly ParticipantServiceProcessor $serviceProcessor,
private readonly BookingPayloadBuilder $payloadBuilder,
@@ -388,7 +388,7 @@ class BookingDataProcessor
$participantPrices[$index] = $this->priceCalculatorService->calculateIndividualParticipantPriceExcludingInsurance($bookingDto, $index);
}
// Use InsuranceService for proper type-based assignment with price tier matching
// Use InsuranceManager for proper type-based assignment with price tier matching
$assignments = $this->insuranceService->batchAssignInsuranceToParticipants(
$selectableInsurances,
$applicant->insurance,
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace App\Command;
use App\BusProNet\XmlLoader\TravelLoader;
use App\Service\TravelSnapshotService;
use App\Service\TravelSnapshotManager;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
@@ -30,7 +30,7 @@ class BpnRefreshTravelSnapshotCommand extends Command
use LockableTrait;
public function __construct(
private readonly TravelSnapshotService $snapshotService,
private readonly TravelSnapshotManager $snapshotService,
private readonly LoggerInterface $logger,
private readonly TravelLoader $travelLoader,
) {
+4 -4
View File
@@ -6,8 +6,8 @@ namespace App\Command;
use App\BusProNet\Model\XmlExportInfo;
use App\BusProNet\XmlLoader\TravelLoader;
use App\Service\TravelDataService;
use App\Service\TravelSnapshotService;
use App\Service\TravelDataProvider;
use App\Service\TravelSnapshotManager;
use League\Flysystem\FilesystemException;
use League\Flysystem\FilesystemOperator;
use League\Flysystem\StorageAttributes;
@@ -41,8 +41,8 @@ class BpnXmlSyncCommand extends Command
private readonly CacheInterface $cache,
private readonly LoggerInterface $logger,
private readonly TravelLoader $travelLoader,
private readonly TravelDataService $travelDataService,
private readonly TravelSnapshotService $snapshotService,
private readonly TravelDataProvider $travelDataService,
private readonly TravelSnapshotManager $snapshotService,
) {
parent::__construct();
}
@@ -6,7 +6,7 @@ namespace App\Command;
use App\BusProNet\Model\Booking;
use App\Repository\BookingEditDraftRepository;
use App\Service\BookingEditDataLoaderService;
use App\Service\BookingEditDataLoader;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
@@ -23,7 +23,7 @@ class DraftBackfillBookingNumberCommand extends Command
{
public function __construct(
private readonly BookingEditDraftRepository $draftRepository,
private readonly BookingEditDataLoaderService $dataLoader,
private readonly BookingEditDataLoader $dataLoader,
private readonly EntityManagerInterface $entityManager,
) {
parent::__construct();
@@ -13,10 +13,10 @@ use App\Exception\NewsletterProviderException;
use App\Form\PersonalDataType;
use App\Repository\NewsletterOptInConfirmationRepository;
use App\Security\Crypt;
use App\Service\BookingEditDataLoaderService;
use App\Service\BookingEditDataLoader;
use App\Service\ProfileCompletenessChecker;
use App\Service\MailjetNewsletterService;
use App\Service\NewsletterDoubleOptInService;
use App\Service\MailjetApiClient;
use App\Service\NewsletterManager;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -39,7 +39,7 @@ class PersonalDataController extends AbstractController
/**
* @param ApiClient $apiClient BusProNet API client for data operations
* @param Crypt $crypt Encryption service for password handling
* @param BookingEditDataLoaderService $dataLoader Data loader for cache invalidation
* @param BookingEditDataLoader $dataLoader Data loader for cache invalidation
* @param ProfileCompletenessChecker $completenessChecker Profile validation service
* @param EntityManagerInterface $entityManager Entity manager for persisting user changes
* @param LoggerInterface $logger Logger for audit trails and debugging
@@ -47,11 +47,11 @@ class PersonalDataController extends AbstractController
public function __construct(
private readonly ApiClient $apiClient,
private readonly Crypt $crypt,
private readonly BookingEditDataLoaderService $dataLoader,
private readonly BookingEditDataLoader $dataLoader,
private readonly ProfileCompletenessChecker $completenessChecker,
private readonly EntityManagerInterface $entityManager,
private readonly MailjetNewsletterService $newsletterService,
private readonly NewsletterDoubleOptInService $doubleOptInService,
private readonly MailjetApiClient $newsletterService,
private readonly NewsletterManager $doubleOptInService,
private readonly NewsletterOptInConfirmationRepository $newsletterConfirmationRepository,
private readonly LoggerInterface $logger,
) {
@@ -7,7 +7,7 @@ namespace App\Controller\Admin;
use App\Admin\Field\JsonDataField;
use App\Entity\BookingEditDraft;
use App\Entity\User;
use App\Service\BookingExportService;
use App\Service\BookingExporter;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
@@ -22,7 +22,7 @@ use Symfony\Component\Routing\Attribute\Route;
class BookingEditDraftCrudController extends AbstractCrudController
{
public function __construct(
private readonly BookingExportService $exportService,
private readonly BookingExporter $exportService,
private readonly AdminUrlGenerator $adminUrlGenerator,
) {
}
@@ -7,7 +7,7 @@ namespace App\Controller\Admin;
use App\Admin\Field\JsonDataField;
use App\Entity\LogEntry;
use App\Repository\LogEntryRepository;
use App\Service\XmlDumpService;
use App\Service\XmlDumpReader;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
@@ -70,7 +70,7 @@ class LogEntryCrudController extends AbstractCrudController
yield JsonDataField::new('extra', 'Extra')->onlyOnDetail();
}
public function xmlDumps(Request $request, XmlDumpService $xmlDumpService): Response
public function xmlDumps(Request $request, XmlDumpReader $xmlDumpService): Response
{
$entityId = $request->query->getInt('entityId');
if ($entityId <= 0) {
+2 -2
View File
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace App\Controller\Admin;
use App\Repository\LogEntryRepository;
use App\Service\XmlDumpService;
use App\Service\XmlDumpReader;
use League\Flysystem\FilesystemException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
@@ -19,7 +19,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class XmlDumpController extends AbstractController
{
public function __construct(
private readonly XmlDumpService $xmlDumpService,
private readonly XmlDumpReader $xmlDumpService,
private readonly LogEntryRepository $logEntryRepository,
) {
}
+2 -2
View File
@@ -6,7 +6,7 @@ use App\BusProNet\ApiClient;
use App\BusProNet\Exception\ApiClientException;
use App\BusProNet\Model\Travel;
use App\BusProNet\Utility\DateCodeUtility;
use App\Service\TravelDataService;
use App\Service\TravelDataProvider;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@@ -21,7 +21,7 @@ class TravelController extends AbstractController
{
public function __construct(
private readonly ApiClient $apiClient,
private readonly TravelDataService $travelDataService,
private readonly TravelDataProvider $travelDataService,
) {
}
@@ -11,9 +11,9 @@ use App\Exception\NoRoomsAvailableException;
use App\Exception\TravelNotFoundException;
use App\Htmx\HxTrait;
use App\Model\BookingQueryParams;
use App\Service\BookingService;
use App\Service\BookingSessionService;
use App\Service\BookingSummaryDataService;
use App\Service\BookingConfigurator;
use App\Service\BookingSessionStore;
use App\Service\BookingSummaryAssembler;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -32,10 +32,10 @@ class IndexController extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingService $bookingService,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingConfigurator $bookingService,
private readonly BookingSessionStore $bookingSessionService,
private readonly AgencyLoader $agencyLoader,
private readonly BookingSummaryDataService $summaryDataService,
private readonly BookingSummaryAssembler $summaryDataService,
) {
}
@@ -10,8 +10,8 @@ use App\Form\BookingCreateStep1Type;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\BookingCreateContextFactory;
use App\Service\BookingService;
use App\Service\BookingSessionService;
use App\Service\BookingConfigurator;
use App\Service\BookingSessionStore;
use App\Service\RoomPricingCalculator;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
@@ -31,8 +31,8 @@ class Step1Controller extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingService $bookingService,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingConfigurator $bookingService,
private readonly BookingSessionStore $bookingSessionService,
private readonly BookingCreateContextFactory $createContextFactory,
) {
}
@@ -8,11 +8,11 @@ use App\Form\BookingParticipantType;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\BookingCreateContextFactory;
use App\Service\BookingService;
use App\Service\BookingSessionService;
use App\Service\ParticipantFormSupportService;
use App\Service\ParticipantPrepopulationService;
use App\Service\TravelDataService;
use App\Service\BookingConfigurator;
use App\Service\BookingSessionStore;
use App\Service\ParticipantFormSupport;
use App\Service\ParticipantDataPrefiller;
use App\Service\TravelDataProvider;
use App\Service\RoomPricingCalculator;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface;
@@ -28,12 +28,12 @@ class Step2ParticipantController extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingService $bookingService,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingConfigurator $bookingService,
private readonly BookingSessionStore $bookingSessionService,
private readonly BookingCreateContextFactory $createContextFactory,
private readonly TravelDataService $travelDataService,
private readonly ParticipantPrepopulationService $prepopulationService,
private readonly ParticipantFormSupportService $participantFormSupportService,
private readonly TravelDataProvider $travelDataService,
private readonly ParticipantDataPrefiller $prepopulationService,
private readonly ParticipantFormSupport $participantFormSupportService,
) {
}
@@ -14,10 +14,10 @@ use App\Form\BookingCreateStep3Type;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\BookingCreateContextFactory;
use App\Service\BookingPriceCalculatorService;
use App\Service\BookingPriceMismatchDiagnosticsService;
use App\Service\BookingService;
use App\Service\BookingSessionService;
use App\Service\BookingPriceCalculator;
use App\Service\BookingPriceMismatchAnalyzer;
use App\Service\BookingConfigurator;
use App\Service\BookingSessionStore;
use App\Service\RoomPricingCalculator;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -36,11 +36,11 @@ class Step3Controller extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingService $bookingService,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingConfigurator $bookingService,
private readonly BookingSessionStore $bookingSessionService,
private readonly BookingCreateContextFactory $createContextFactory,
private readonly BookingPriceCalculatorService $priceCalculator,
private readonly BookingPriceMismatchDiagnosticsService $priceMismatchDiagnostics,
private readonly BookingPriceCalculator $priceCalculator,
private readonly BookingPriceMismatchAnalyzer $priceMismatchDiagnostics,
private readonly ApiClient $apiClient,
private readonly LoggerInterface $logger,
) {
@@ -15,11 +15,11 @@ use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Entity\User;
use App\Service\BookingCreateContextFactory;
use App\Service\BookingPriceCalculatorService;
use App\Service\BookingService;
use App\Service\BookingSessionService;
use App\Service\MailjetNewsletterService;
use App\Service\NewsletterDoubleOptInService;
use App\Service\BookingPriceCalculator;
use App\Service\BookingConfigurator;
use App\Service\BookingSessionStore;
use App\Service\MailjetApiClient;
use App\Service\NewsletterManager;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface;
@@ -38,14 +38,14 @@ class Step4Controller extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingService $bookingService,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingConfigurator $bookingService,
private readonly BookingSessionStore $bookingSessionService,
private readonly BookingCreateContextFactory $createContextFactory,
private readonly BookingPriceCalculatorService $priceCalculator,
private readonly BookingPriceCalculator $priceCalculator,
private readonly ApiClient $apiClient,
private readonly CacheInterface $cache,
private readonly MailjetNewsletterService $newsletterService,
private readonly NewsletterDoubleOptInService $doubleOptInService,
private readonly MailjetApiClient $newsletterService,
private readonly NewsletterManager $doubleOptInService,
private readonly LoggerInterface $logger,
) {
}
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace App\Controller\Booking\Create;
use App\Service\BookingSessionService;
use App\Service\BookingSessionStore;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -16,7 +16,7 @@ use Symfony\Component\Routing\Attribute\Route;
class SuccessController extends AbstractController
{
public function __construct(
private readonly BookingSessionService $bookingSessionService,
private readonly BookingSessionStore $bookingSessionService,
) {
}
+11 -11
View File
@@ -11,12 +11,12 @@ use App\Exception\TravelNotFoundException;
use App\Form\BookingEditType;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\BookingEditDataLoaderService;
use App\Service\BookingEditDraftService;
use App\Service\BookingEditDataLoader;
use App\Service\BookingEditDraftManager;
use App\Service\BookingEditContextFactory;
use App\Service\BookingFingerprintService;
use App\Service\BookingEditSubmitService;
use App\Service\BookingSessionService;
use App\Service\BookingChangeTracker;
use App\Service\BookingEditSubmitter;
use App\Service\BookingSessionStore;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -30,7 +30,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
* - Card overview with lazy-loaded individual participant forms
* - Handles canceled participants (status 'S')
* - Applies mutability constraints via EditFieldStateProvider
* - Final submission is delegated to BookingEditSubmitService
* - Final submission is delegated to BookingEditSubmitter
*/
class IndexController extends AbstractController
{
@@ -38,12 +38,12 @@ class IndexController extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingEditDataLoaderService $dataLoader,
private readonly BookingEditDraftService $draftService,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingFingerprintService $fingerprintService,
private readonly BookingEditDataLoader $dataLoader,
private readonly BookingEditDraftManager $draftService,
private readonly BookingSessionStore $bookingSessionService,
private readonly BookingChangeTracker $fingerprintService,
private readonly BookingEditContextFactory $editContextFactory,
private readonly BookingEditSubmitService $submitService,
private readonly BookingEditSubmitter $submitService,
) {
}
@@ -10,11 +10,11 @@ use App\Entity\User;
use App\Form\BookingParticipantType;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\BookingEditDataLoaderService;
use App\Service\BookingEditDataLoader;
use App\Service\BookingEditContextFactory;
use App\Service\BookingEditDraftService;
use App\Service\BookingSessionService;
use App\Service\ParticipantFormSupportService;
use App\Service\BookingEditDraftManager;
use App\Service\BookingSessionStore;
use App\Service\ParticipantFormSupport;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -29,11 +29,11 @@ class ParticipantController extends AbstractController
use HxTrait;
public function __construct(
private readonly BookingEditDataLoaderService $dataLoader,
private readonly BookingEditDraftService $draftService,
private readonly BookingEditDataLoader $dataLoader,
private readonly BookingEditDraftManager $draftService,
private readonly BookingEditContextFactory $editContextFactory,
private readonly BookingSessionService $bookingSessionService,
private readonly ParticipantFormSupportService $participantFormSupportService,
private readonly BookingSessionStore $bookingSessionService,
private readonly ParticipantFormSupport $participantFormSupportService,
) {
}
@@ -10,7 +10,7 @@ use App\Exception\HotelNotInTravelException;
use App\Exception\NoRoomsAvailableException;
use App\Exception\TravelNotFoundException;
use App\Form\Model\BookingDto;
use App\Service\BookingSessionService;
use App\Service\BookingSessionStore;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -29,7 +29,7 @@ trait BookingExceptionHandlerTrait
* Handles all booking-related exceptions and provides appropriate user feedback
* by redirecting to the error page with flash messages.
*/
protected function getOrCreateBookingCreateDto(BookingSessionService $bookingSessionService, Request $request): BookingDto|RedirectResponse
protected function getOrCreateBookingCreateDto(BookingSessionStore $bookingSessionService, Request $request): BookingDto|RedirectResponse
{
try {
return $bookingSessionService->getOrCreateBookingCreateDto($request);
@@ -62,7 +62,7 @@ trait BookingExceptionHandlerTrait
* Returns empty 400 responses for HTMX requests when exceptions occur,
* allowing the frontend to handle errors appropriately.
*/
protected function getOrCreateBookingCreateDtoForHtmx(BookingSessionService $bookingSessionService, Request $request): mixed
protected function getOrCreateBookingCreateDtoForHtmx(BookingSessionStore $bookingSessionService, Request $request): mixed
{
try {
return $bookingSessionService->getOrCreateBookingCreateDto($request);
@@ -6,7 +6,7 @@ namespace App\Controller\Newsletter;
use App\Exception\NewsletterProviderException;
use App\Model\NewsletterConfirmationResult;
use App\Service\NewsletterDoubleOptInService;
use App\Service\NewsletterManager;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
@@ -16,7 +16,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class ConfirmController extends AbstractController
{
public function __construct(
private readonly NewsletterDoubleOptInService $doubleOptInService,
private readonly NewsletterManager $doubleOptInService,
private readonly LoggerInterface $logger,
) {
}
+5 -5
View File
@@ -2,8 +2,8 @@
namespace App\Controller;
use App\Service\BookingSessionService;
use App\Service\BookingSummaryDataService;
use App\Service\BookingSessionStore;
use App\Service\BookingSummaryAssembler;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -18,11 +18,11 @@ class SecurityController extends AbstractController
public function login(
AuthenticationUtils $authenticationUtils,
Request $request,
BookingSessionService $bookingSessionService,
BookingSummaryDataService $summaryDataService,
BookingSessionStore $bookingSessionService,
BookingSummaryAssembler $summaryDataService,
): Response {
// Check if this is a booking flow (BookingDto exists in session)
$bookingDto = $bookingSessionService->getBookingDto($request, BookingSessionService::BOOKING_CREATE_KEY);
$bookingDto = $bookingSessionService->getBookingDto($request, BookingSessionStore::BOOKING_CREATE_KEY);
$isBookingFlow = null !== $bookingDto;
// If authenticated and in booking flow, proceed to Step 1
+2 -2
View File
@@ -331,7 +331,7 @@ class BookingDto
*
* Replaces the full Travel object with just its integer ID. The Booking's
* travelData reference is also removed since it points to the same object.
* BookingService::hydrate() restores the Travel from cache after session read.
* BookingConfigurator::hydrate() restores the Travel from cache after session read.
*
* @return array<string, mixed>
*/
@@ -356,7 +356,7 @@ class BookingDto
/**
* Restores the DTO from session data with a minimal Travel placeholder.
*
* Creates a Travel object containing only the ID. BookingService::hydrate()
* Creates a Travel object containing only the ID. BookingConfigurator::hydrate()
* replaces this with the full Travel from cache on every session read.
*
* @param array<string, mixed> $data
@@ -6,7 +6,7 @@ namespace App\Form\Service\Condition;
use App\Form\Model\BookingDto;
use App\Form\Service\Contract\FieldConditionInterface;
use App\Service\ParticipantEligibilityService;
use App\Service\ParticipantEligibilityChecker;
/**
* Condition that evaluates whether a participant is eligible for booking.
@@ -26,7 +26,7 @@ use App\Service\ParticipantEligibilityService;
class BookingEligibilityCondition implements FieldConditionInterface
{
public function __construct(
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly ParticipantEligibilityChecker $participantEligibilityService,
) {
}
@@ -24,7 +24,7 @@ use App\Form\Service\Condition\ServiceSubTypeCondition;
use App\Form\Service\Condition\SingleRoomTypeCondition;
use App\Form\Service\Condition\SkiPassSelectionCondition;
use App\Form\Service\Condition\TravelStartCutoffReachedCondition;
use App\Service\ParticipantEligibilityService;
use App\Service\ParticipantEligibilityChecker;
/**
* Field state provider for the booking create workflow.
@@ -44,7 +44,7 @@ use App\Service\ParticipantEligibilityService;
class CreateFieldStateProvider extends AbstractFieldStateProvider
{
public function __construct(
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly ParticipantEligibilityChecker $participantEligibilityService,
) {
parent::__construct();
}
@@ -317,7 +317,7 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
// Room assignment field:
// - Hidden until date of birth is provided (age determines room eligibility, e.g., Baby rooms)
// - Rendered as static text when only one room type is selected (auto-assigned by RoomAssignmentService)
// - Rendered as static text when only one room type is selected (auto-assigned by RoomAssigner)
$this->fieldStateConditions['assignedRoomId'] = [
'hidden' => CompositeCondition::not($dateOfBirthProvidedCondition),
'static_text' => new SingleRoomTypeCondition(),
@@ -14,8 +14,8 @@ use App\BusProNet\Utility\DirectionMapper;
use App\Form\Model\BookingDto;
use App\Form\Model\RoomSelectionDto;
use App\Form\Service\Abstract\AbstractFieldOptionsProvider;
use App\Service\BookingPriceCalculatorService;
use App\Service\InsuranceService;
use App\Service\BookingPriceCalculator;
use App\Service\InsuranceManager;
use App\Service\ServiceLabelFormatter;
use App\Service\ServiceAvailabilityCalculator;
use Symfony\Contracts\Translation\TranslatorInterface;
@@ -41,8 +41,8 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
{
public function __construct(
private readonly ServiceAvailabilityCalculator $serviceAvailabilityCalculator,
private readonly InsuranceService $insuranceService,
private readonly BookingPriceCalculatorService $priceCalculatorService,
private readonly InsuranceManager $insuranceService,
private readonly BookingPriceCalculator $priceCalculatorService,
private readonly ServiceLabelFormatter $serviceLabelFormatter,
private readonly TranslatorInterface $translator,
) {
@@ -1112,14 +1112,14 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
/**
* Gets the rental insurance description for help text.
*/
private function getRentalInsuranceDescription(array $rentalInsuranceServices): ?string
private function getRentalInsuranceDescription(array $rentalInsuranceManagers): ?string
{
if (empty($rentalInsuranceServices)) {
if (empty($rentalInsuranceManagers)) {
return null;
}
$rentalInsuranceService = reset($rentalInsuranceServices); // Get the first (and only) rental insurance service
$rentalInsuranceManager = reset($rentalInsuranceManagers); // Get the first (and only) rental insurance service
return $rentalInsuranceService->description;
return $rentalInsuranceManager->description;
}
/**
@@ -7,8 +7,8 @@ namespace App\Form\Service;
use App\BusProNet\Model\Insurance;
use App\Form\Model\BookingDto;
use App\Form\Service\Abstract\AbstractParticipantFieldHandler;
use App\Service\BookingPriceCalculatorService;
use App\Service\InsuranceService;
use App\Service\BookingPriceCalculator;
use App\Service\InsuranceManager;
/**
* Handles processing of the insurance field for booking participants.
@@ -35,8 +35,8 @@ use App\Service\InsuranceService;
class ParticipantInsuranceFieldHandler extends AbstractParticipantFieldHandler
{
public function __construct(
private readonly InsuranceService $insuranceService,
private readonly BookingPriceCalculatorService $priceCalculatorService,
private readonly InsuranceManager $insuranceService,
private readonly BookingPriceCalculator $priceCalculatorService,
) {
}
@@ -6,8 +6,8 @@ namespace App\Form\Service;
use App\Form\Model\BookingDto;
use App\Form\Service\Abstract\AbstractParticipantFieldHandler;
use App\Service\BookingPriceCalculatorService;
use App\Service\VoucherValidationService;
use App\Service\BookingPriceCalculator;
use App\Service\VoucherValidator;
/**
* Handles promotional voucher code field processing.
@@ -22,8 +22,8 @@ use App\Service\VoucherValidationService;
class ParticipantPromoVoucherFieldHandler extends AbstractParticipantFieldHandler
{
public function __construct(
private readonly VoucherValidationService $voucherValidationService,
private readonly BookingPriceCalculatorService $priceCalculatorService,
private readonly VoucherValidator $voucherValidationService,
private readonly BookingPriceCalculator $priceCalculatorService,
) {
}
@@ -6,7 +6,7 @@ namespace App\Form\Service;
use App\Form\Model\BookingDto;
use App\Form\Service\Abstract\AbstractParticipantFieldHandler;
use App\Service\VoucherValidationService;
use App\Service\VoucherValidator;
/**
* Handles purchase voucher code field processing.
@@ -20,7 +20,7 @@ use App\Service\VoucherValidationService;
class ParticipantPurchaseVoucherFieldHandler extends AbstractParticipantFieldHandler
{
public function __construct(
private readonly VoucherValidationService $voucherValidationService,
private readonly VoucherValidator $voucherValidationService,
) {
}
@@ -107,7 +107,7 @@ class ParticipantRentalInsuranceFieldHandler extends AbstractParticipantFieldHan
// Store service object based on checkbox state for pricing calculations
if (true === $isRentalInsuranceSelected) {
$participant->rentalInsurance = $this->findRentalInsuranceService($bookingDto, $participantIndex);
$participant->rentalInsurance = $this->findRentalInsuranceManager($bookingDto, $participantIndex);
} else {
$participant->rentalInsurance = null;
}
@@ -124,20 +124,20 @@ class ParticipantRentalInsuranceFieldHandler extends AbstractParticipantFieldHan
*
* @return Service|null The rental insurance service object, or null if not found
*/
private function findRentalInsuranceService(BookingDto $bookingDto, int $participantIndex): ?Service
private function findRentalInsuranceManager(BookingDto $bookingDto, int $participantIndex): ?Service
{
// Get available rental insurance services (includes booked insurance in edit mode)
$rentalInsuranceServices = $this->getAvailableServicesWithBooked(
$rentalInsuranceManagers = $this->getAvailableServicesWithBooked(
$bookingDto,
$participantIndex,
Constants::TOKEN_RENTAL_INSURANCE,
true
);
if (empty($rentalInsuranceServices)) {
if (empty($rentalInsuranceManagers)) {
return null;
}
return reset($rentalInsuranceServices); // Get the first (and typically only) rental insurance service
return reset($rentalInsuranceManagers); // Get the first (and typically only) rental insurance service
}
}
+2 -2
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace App\Logger;
use App\Service\ErrorCodeService;
use App\Service\ErrorCodeGenerator;
use Monolog\Attribute\AsMonologProcessor;
use Monolog\Level;
use Monolog\LogRecord;
@@ -20,7 +20,7 @@ use Monolog\LogRecord;
class ErrorCodeProcessor
{
public function __construct(
private readonly ErrorCodeService $errorCodeService,
private readonly ErrorCodeGenerator $errorCodeService,
) {
}
@@ -14,7 +14,7 @@ use App\Form\Model\ParticipantDto;
* Used by EditController to determine if user modifications need to be saved.
* Also provides data extraction for draft persistence.
*/
class BookingFingerprintService
class BookingChangeTracker
{
/**
* Generates a fingerprint (hash) of all mutable booking data.
@@ -19,12 +19,12 @@ use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class BookingService
class BookingConfigurator
{
public function __construct(
private readonly BookingSessionService $bookingSessionService,
private readonly TravelDataService $travelDataService,
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly BookingSessionStore $bookingSessionService,
private readonly TravelDataProvider $travelDataService,
private readonly ParticipantEligibilityChecker $participantEligibilityService,
private readonly BookingStatusRuleRegistry $bookingStatusRuleRegistry,
private readonly AgencyLoader $agencyLoader,
#[Autowire('%default_booking_status%')]
+3 -3
View File
@@ -16,9 +16,9 @@ use App\Form\Model\BookingMutabilityDto;
class BookingEditContextFactory
{
public function __construct(
private readonly ParticipantCardDataService $participantCardDataService,
private readonly BookingSummaryDataService $summaryDataService,
private readonly TravelDataService $travelDataService,
private readonly ParticipantCardAssembler $participantCardDataService,
private readonly BookingSummaryAssembler $summaryDataService,
private readonly TravelDataProvider $travelDataService,
) {
}
@@ -23,7 +23,7 @@ use Symfony\Contracts\Cache\TagAwareCacheInterface;
* Encapsulates the logic for loading booking data from session or API,
* refreshing availability data, and restoring drafts when available.
*/
class BookingEditDataLoaderService
class BookingEditDataLoader
{
public const string CACHE_TAG_USER_PREFIX = 'user_bookings_';
@@ -32,10 +32,10 @@ class BookingEditDataLoaderService
public function __construct(
private readonly ApiClient $apiClient,
private readonly BookingDataProcessor $bookingDataProcessor,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingFingerprintService $fingerprintService,
private readonly TravelDataService $travelDataService,
private readonly BookingEditDraftService $draftService,
private readonly BookingSessionStore $bookingSessionService,
private readonly BookingChangeTracker $fingerprintService,
private readonly TravelDataProvider $travelDataService,
private readonly BookingEditDraftManager $draftService,
private readonly AgencyLoader $agencyLoader,
private readonly Crypt $crypt,
private readonly TagAwareCacheInterface $bpnCache,
@@ -20,7 +20,7 @@ use App\Form\Service\Condition\TravelStartCutoffReachedCondition;
* immutable categories are reverted to the current booking state so update
* payloads cannot include blocked changes.
*/
class BookingEditSubmitGuardService
class BookingEditSubmitGuard
{
public function __construct(
private readonly BookingDataProcessor $bookingDataProcessor,
@@ -18,15 +18,15 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
* Handles the final booking edit submission workflow.
*/
class BookingEditSubmitService
class BookingEditSubmitter
{
public function __construct(
private readonly ApiClient $apiClient,
private readonly BookingEditDataLoaderService $dataLoader,
private readonly BookingEditDraftService $draftService,
private readonly TravelDataService $travelDataService,
private readonly BookingEditSubmitGuardService $submitGuard,
private readonly BookingSessionService $bookingSessionService,
private readonly BookingEditDataLoader $dataLoader,
private readonly BookingEditDraftManager $draftService,
private readonly TravelDataProvider $travelDataService,
private readonly BookingEditSubmitGuard $submitGuard,
private readonly BookingSessionStore $bookingSessionService,
private readonly UrlGeneratorInterface $urlGenerator,
private readonly LoggerInterface $logger,
) {
@@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
* converting all service, room, and pickup IDs to human-readable labels using
* travel data loaded from XML files.
*/
class BookingExportService
class BookingExporter
{
private const COLUMN_HEADERS = [
'Vorname',
@@ -54,7 +54,7 @@ class BookingExportService
];
public function __construct(
private readonly TravelDataService $travelDataService,
private readonly TravelDataProvider $travelDataService,
) {
}
@@ -17,12 +17,12 @@ use App\Form\Model\ParticipantDto;
* coordinating room and participant calculations and handling service aggregation directly.
* Returns structured pricing data for display in forms and summaries.
*/
class BookingPriceCalculatorService
class BookingPriceCalculator
{
public function __construct(
private readonly RoomPricingCalculator $roomPricingCalculator,
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly InsuranceService $insuranceService,
private readonly ParticipantEligibilityChecker $participantEligibilityService,
private readonly InsuranceManager $insuranceService,
private readonly ParticipantPricingCalculator $participantPricingCalculator,
) {
}
@@ -12,10 +12,10 @@ use App\Form\Model\BookingDto;
/**
* Builds diagnostic payloads for booking price mismatches.
*/
class BookingPriceMismatchDiagnosticsService
class BookingPriceMismatchAnalyzer
{
public function __construct(
private readonly BookingPriceCalculatorService $priceCalculator,
private readonly BookingPricingAssembler $pricingAssembler,
) {
}
@@ -24,7 +24,7 @@ class BookingPriceMismatchDiagnosticsService
*/
public function buildDiagnostics(BookingDto $bookingCreateDto, BookingResponse $response): array
{
$pricingBreakdown = $this->priceCalculator->getPricingBreakdown($bookingCreateDto);
$pricingBreakdown = $this->pricingAssembler->getPricingBreakdown($bookingCreateDto);
$roomLines = $pricingBreakdown['rooms'] ?? [];
$serviceGroups = $pricingBreakdown['services'] ?? [];
@@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Request;
* orchestration and pricing logic. It handles DTO persistence, baseline
* room snapshots, and return URL storage for the booking create/edit flows.
*/
class BookingSessionService
class BookingSessionStore
{
public const BOOKING_CREATE_KEY = 'booking_create';
public const BOOKING_CREATE_BASELINE_KEY = 'booking_create_baseline_snapshot';
@@ -24,7 +24,7 @@ class BookingSessionService
public const DEFAULT_RETURN_URL = 'https://www.ep-reisen.de';
public function __construct(
private readonly TravelDataService $travelDataService,
private readonly TravelDataProvider $travelDataService,
) {
}
@@ -5,7 +5,7 @@ namespace App\Service;
use Symfony\Contracts\HttpClient\Exception\ExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class CmsDataService
class CmsDataProvider
{
public function __construct(private readonly HttpClientInterface $httpClient, private readonly string $apiKey)
{
@@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
* to report error codes to support staff who can then search logs by the code.
* The code format is E-XXXXXXXX (8 uppercase alphanumeric characters in base36).
*/
class ErrorCodeService
class ErrorCodeGenerator
{
private ?string $errorCode = null;
private bool $hasError = false;
@@ -18,7 +18,7 @@ use Carbon\Carbon;
* Uses request-scoped instance-level caching to optimize performance for bookings with many participants.
* This service is stateless and has no dependencies to avoid circular dependency issues.
*/
class InsuranceService
class InsuranceManager
{
use SortByPriceTrait;
@@ -8,7 +8,7 @@ use App\Exception\NewsletterProviderException;
use Psr\Log\LoggerInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class MailjetNewsletterService
class MailjetApiClient
{
private const DEFAULT_BASE_URL = 'https://api.mailjet.com/v3/REST';
@@ -12,12 +12,12 @@ use App\Repository\NewsletterOptInConfirmationRepository;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
class NewsletterDoubleOptInService
class NewsletterManager
{
public function __construct(
private readonly NewsletterOptInConfirmationRepository $confirmationRepository,
private readonly EntityManagerInterface $entityManager,
private readonly MailjetNewsletterService $newsletterService,
private readonly MailjetApiClient $newsletterService,
private readonly Mailer $mailer,
private readonly LoggerInterface $logger,
private readonly int $newsletterConfirmationTtlHours,
@@ -16,10 +16,10 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
* Provides participant name, room assignment, and individual pricing for
* display in the card overview UI.
*/
class ParticipantCardDataService
class ParticipantCardAssembler
{
public function __construct(
private readonly BookingPriceCalculatorService $priceCalculator,
private readonly BookingPriceCalculator $priceCalculator,
private readonly ValidatorInterface $validator,
) {
}
@@ -21,7 +21,7 @@ use Psr\Log\LoggerInterface;
* the booking process for authenticated users. All errors are handled gracefully
* to ensure the booking flow is never interrupted.
*/
class ParticipantPrepopulationService
class ParticipantDataPrefiller
{
public const TOKEN = '#KUN#';
@@ -45,7 +45,7 @@ class ParticipantPrepopulationService
*
* @return ParticipantDto The prepopulated participant (or unchanged if API fails)
*/
public function prepopulateApplicantFromUser(User $user, ParticipantDto $applicant): ParticipantDto
public function prefillApplicantFromUser(User $user, ParticipantDto $applicant): ParticipantDto
{
try {
// Decrypt user password for API authentication
@@ -105,7 +105,7 @@ class ParticipantPrepopulationService
*
* Only prepopulates if the participant is fresh.
*/
public function shouldPrepopulateApplicant(ParticipantDto $applicant): bool
public function shouldPrefillApplicant(ParticipantDto $applicant): bool
{
return null === $applicant->firstName || '' === $applicant->firstName;
}
@@ -20,7 +20,7 @@ use Carbon\CarbonImmutable;
* Results are cached per request using instance-level arrays to avoid redundant calculations
* when checking the same participant multiple times.
*/
class ParticipantEligibilityService
class ParticipantEligibilityChecker
{
/** @var array<string, bool> Request-scoped cache for participant eligibility */
private array $eligibilityCache = [];
@@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* Shared helpers for participant edit forms in create and edit booking flows.
*/
class ParticipantFormSupportService
class ParticipantFormSupport
{
public function __construct(
private readonly ParameterBagInterface $parameterBag,
@@ -12,7 +12,7 @@ use App\Form\Model\BookingDto;
* This service automatically assigns participants to selected rooms based on room capacity
* and quantity, eliminating the need for manual room selection in the booking flow.
*/
class RoomAssignmentService
class RoomAssigner
{
/**
* Determines if automatic room assignment should be performed.
@@ -27,10 +27,10 @@ use Symfony\Contracts\Cache\ItemInterface;
* prefer snapshots for performance and refresh those snapshots from XML during sync. It handles
* caching, error recovery, and data enrichment for both data sources.
*
* Mapping/lookup operations are delegated to TravelLookupService.
* Travel enrichment (XML details, insurances) is delegated to TravelEnrichmentService.
* Mapping/lookup operations are delegated to TravelIndex.
* Travel enrichment (XML details, insurances) is delegated to TravelEnricher.
*/
class TravelDataService
class TravelDataProvider
{
public const string SOURCE_LOCAL = 'local';
public const string SOURCE_REMOTE = 'remote';
@@ -42,9 +42,9 @@ class TravelDataService
private readonly ApiClient $apiClient,
private readonly CacheInterface $cache,
private readonly LoggerInterface $logger,
private readonly TravelSnapshotService $travelSnapshotService,
private readonly TravelLookupService $travelLookupService,
private readonly TravelEnrichmentService $travelEnrichmentService,
private readonly TravelSnapshotManager $travelSnapshotService,
private readonly TravelIndex $travelLookupService,
private readonly TravelEnricher $travelEnrichmentService,
private readonly bool $preferRemote = false,
private readonly bool $enableFallback = true,
) {
@@ -18,7 +18,7 @@ use Psr\Log\LoggerInterface;
* - Insurance patching applied to every local travel, replacing any stale snapshot data
* with freshly parsed, fully-hydrated Insurance objects from the XML loader
*/
class TravelEnrichmentService
class TravelEnricher
{
public function __construct(
private readonly PickupLoader $pickupLoader,
@@ -14,7 +14,7 @@ use Psr\Log\LoggerInterface;
* Consolidates code/ID mapping, dateId→productId resolution, and the combined XML+snapshot
* files map. All operations are read-only and never load full Travel objects.
*/
class TravelLookupService
class TravelIndex
{
/** @var array<int, array<string, mixed>>|null */
private ?array $filesMapCache = null;
@@ -22,7 +22,7 @@ class TravelLookupService
public function __construct(
private readonly TravelLoader $travelLoader,
private readonly HotelLoader $hotelLoader,
private readonly TravelSnapshotService $travelSnapshotService,
private readonly TravelSnapshotManager $travelSnapshotService,
private readonly LoggerInterface $logger,
) {
}
@@ -27,7 +27,7 @@ use Symfony\Component\Serializer\SerializerInterface;
* - Enrich snapshots with extended availability data.
* - Purge expired snapshot records.
*/
class TravelSnapshotService
class TravelSnapshotManager
{
public function __construct(
private readonly TravelSnapshotRepository $snapshotRepository,
@@ -13,7 +13,7 @@ use Psr\Log\LoggerInterface;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\ItemInterface;
class VoucherValidationService
class VoucherValidator
{
private const CACHE_TTL = 900; // 15 minutes
@@ -14,7 +14,7 @@ use League\Flysystem\FilesystemOperator;
* the request ID, sequence number, and type (request/response). This service
* allows finding and reading dumps by request ID.
*/
class XmlDumpService
class XmlDumpReader
{
public function __construct(
private readonly FilesystemOperator $xmlDump,
+2 -2
View File
@@ -11,7 +11,7 @@ use App\Form\Service\Condition\TravelStartCutoffReachedCondition;
use App\Form\Service\CreateFieldStateProvider;
use App\Form\Service\EditFieldStateProvider;
use App\Model\DomainConfig;
use App\Service\ParticipantEligibilityService;
use App\Service\ParticipantEligibilityChecker;
use Symfony\Component\Form\FormView;
use Symfony\Component\HttpFoundation\RequestStack;
use Twig\Environment;
@@ -30,7 +30,7 @@ class AppRuntime implements RuntimeExtensionInterface
public function __construct(
private readonly IntlExtension $intlExtension,
private readonly CountryDataProvider $countryDataProvider,
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly ParticipantEligibilityChecker $participantEligibilityService,
private readonly CreateFieldStateProvider $createFieldStateProvider,
private readonly EditFieldStateProvider $editFieldStateProvider,
private readonly RequestStack $requestStack,
+2 -2
View File
@@ -4,14 +4,14 @@ declare(strict_types=1);
namespace App\Twig;
use App\Service\ErrorCodeService;
use App\Service\ErrorCodeGenerator;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
class ErrorCodeExtension extends AbstractExtension
{
public function __construct(
private readonly ErrorCodeService $errorCodeService,
private readonly ErrorCodeGenerator $errorCodeService,
) {
}
@@ -8,7 +8,7 @@ use App\BusProNet\Constants;
use App\BusProNet\Model\Service;
use App\Form\Model\ParticipantEditDto;
use App\Form\Service\ServiceAgeEvaluator;
use App\Service\ParticipantEligibilityService;
use App\Service\ParticipantEligibilityChecker;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@@ -19,7 +19,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class MandatoryAdditionalServicesSelectedValidator extends ConstraintValidator
{
public function __construct(
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly ParticipantEligibilityChecker $participantEligibilityService,
private readonly ServiceAgeEvaluator $serviceAgeEvaluator,
) {
}
@@ -5,8 +5,8 @@ declare(strict_types=1);
namespace App\Validator\Constraints;
use App\Form\Model\ParticipantEditDto;
use App\Service\BookingPriceCalculatorService;
use App\Service\VoucherValidationService;
use App\Service\BookingPriceCalculator;
use App\Service\VoucherValidator;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@@ -21,8 +21,8 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class PromoVoucherValidator extends ConstraintValidator
{
public function __construct(
private readonly VoucherValidationService $voucherValidationService,
private readonly BookingPriceCalculatorService $priceCalculatorService,
private readonly VoucherValidator $voucherValidationService,
private readonly BookingPriceCalculator $priceCalculatorService,
) {
}
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace App\Validator\Constraints;
use App\Form\Model\ParticipantEditDto;
use App\Service\VoucherValidationService;
use App\Service\VoucherValidator;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@@ -19,7 +19,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class PurchaseVoucherValidator extends ConstraintValidator
{
public function __construct(
private readonly VoucherValidationService $voucherValidationService,
private readonly VoucherValidator $voucherValidationService,
) {
}