feat: replace *Service suffix with role-based class names
This commit is contained in:
1 parent
0d2cc5b998
commit
d1c92f2957
88 files changed
+435
-435
No files matched your search
@@ -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,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);
|
||||
|
||||
Reference in new issue
Block a user