| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- declare(strict_types=1);
- namespace App\Message\Handler\Shop;
- use App\Message\Message\Shop\NewStructureArtistPremiumTrial;
- use App\Service\Shop\ShopService;
- use Symfony\Component\Messenger\Attribute\AsMessageHandler;
- /**
- * Message handler for processing new structure artist premium trial requests.
- *
- * This class handles the NewStructureArtistPremiumTrial message, which is dispatched
- * when a user validates a trial request by clicking the activation link in the email.
- *
- * It delegates the actual processing to the ShopService.
- */
- #[AsMessageHandler]
- readonly class NewStructureArtistPremiumTrialHandler
- {
- public function __construct(
- private ShopService $shopService,
- ) {
- }
- /**
- * @param NewStructureArtistPremiumTrial $message The message to process
- */
- public function __invoke(NewStructureArtistPremiumTrial $message): void
- {
- $token = $message->getToken();
- $this->shopService->handleNewStructureArtistPremiumTrialRequest($token);
- }
- }
|