diff --git a/src/Event/EventType/Cej/EventTypeCej.php b/src/Event/EventType/Cej/EventTypeCej.php index db46e0d4..1ff0cc46 100755 --- a/src/Event/EventType/Cej/EventTypeCej.php +++ b/src/Event/EventType/Cej/EventTypeCej.php @@ -37,7 +37,7 @@ public function transformPayment(Payment $payment, Participant $participant): Pa $payment->currency = 'Kč'; $payment->variableSymbol = 42438 . substr($payment->variableSymbol, 5); $payment->constantSymbol = ''; - + return $payment; } diff --git a/src/Mailer/PhpMailerWrapper.php b/src/Mailer/PhpMailerWrapper.php index aa2a6d54..3cc4ed72 100755 --- a/src/Mailer/PhpMailerWrapper.php +++ b/src/Mailer/PhpMailerWrapper.php @@ -227,7 +227,7 @@ private function sendMailFromTemplate( $email->context(array_merge($parameters, [ 'fullRegistrationLink' => $this->settings->getFullUrlLink(), 'eventImageExists' => is_file(__DIR__ . '/../../public/' . $event->logoUrl), - ])); + ])); array_map(fn (string $attachment) => $email->attach($attachment), $attachments); foreach ($embeds as $embed) { $email->embed($embed->resource, $embed->name, $embed->contentType); @@ -242,6 +242,13 @@ private function sendMailFromTemplate( $mailer = new Mailer($transport, dispatcher: $eventDispatcher); $mailer->send($email); + + $this->logger->info(sprintf( + 'Sent email to %s with subject %s from template name %s', + $recipientEmail, + $subject, + $templateName, + )); } /** diff --git a/src/Settings/Settings.php b/src/Settings/Settings.php index fa8a0b74..e9a2bd47 100755 --- a/src/Settings/Settings.php +++ b/src/Settings/Settings.php @@ -238,15 +238,10 @@ public function getContainerDefinition(string $envPath, string $envFilename): ar $logger->pushHandler( new StreamHandler('php://stdout', $_ENV['LOGGER_LEVEL']), ); - - $sentryHandler = new SentryHandler( - $sentryHub, - Logger::WARNING, + $logger->pushHandler( + new SentryHandler($sentryHub, Logger::INFO), ); - // Log only warnings or higher severity events/errors to Sentry - $logger->pushHandler($sentryHandler); - if ($_ENV['DEBUG'] === 'true') { $logger->pushHandler( new StreamHandler(__DIR__ . '/../../logs/debug.log', Logger::DEBUG), diff --git a/src/User/UserRole.php b/src/User/UserRole.php index a00b1a02..76768239 100755 --- a/src/User/UserRole.php +++ b/src/User/UserRole.php @@ -39,12 +39,8 @@ public static function adminRoles(): array public function isEligibleToConfirmPayments(): bool { return match ($this) { - self::Admin, - self::ContingentAdminCs, - self::ContingentAdminSk, - => true, - default - => false, + self::Admin, self::ContingentAdminCs, self::ContingentAdminSk => true, + default => false, }; } }