diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 8d46fc323..99aa394f1 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -7603,12 +7603,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method getTitle\\(\\) on AppBundle\\\\Event\\\\Model\\\\Event\\|null\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 2, - 'path' => __DIR__ . '/sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php', -]; $ignoreErrors[] = [ 'message' => '#^Cannot access offset \'\\.aggregation\' on mixed\\.$#', 'identifier' => 'offsetAccess.nonOffsetAccessible', diff --git a/sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php b/sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php index 282d510aa..779308df1 100644 --- a/sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php +++ b/sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php @@ -25,17 +25,17 @@ public function __construct( public function sendSponsorshipFile(Lead $lead): void { $file = Event::getSponsorFilePath($lead->getEvent()->getPath(), $lead->getLanguage()); - $subject = $this->translator->trans('mail.sponsoringfile.title', ['%eventName%' => $lead->getEvent()->getTitle()]); + $subject = $this->translator->trans('mail.sponsoringfile.title'); $message = new Message($subject, MailUserFactory::sponsors(), new MailUser($lead->getEmail(), $lead->getLabel())); $message->addAttachment(new Attachment( $file, - basename($file), + sprintf('dossier-sponsoring-afup-%s.pdf', $lead->getLanguage()), 'base64', 'application/pdf', )); - $content = $this->translator->trans('mail.sponsoringfile.text', ['%eventName%' => $lead->getEvent()->getTitle()]); + $content = $this->translator->trans('mail.sponsoringfile.text'); if (!$this->mailer->sendTransactional($message, $content)) { $this->logger->warning(sprintf('Mail not sent for sponsorship lead retrieval: "%s"', $lead->getEmail())); diff --git a/tests/behat/features/PublicSite/Sponsor.feature b/tests/behat/features/PublicSite/Sponsor.feature index 6ae601830..7bd99cccd 100644 --- a/tests/behat/features/PublicSite/Sponsor.feature +++ b/tests/behat/features/PublicSite/Sponsor.feature @@ -27,7 +27,7 @@ Feature: Site Public - Devenir sponsor And I should only receive the following emails: | to | subject | | | forum - Nouvelle demande de dossier de sponsoring | - | | Dossier de sponsoring forum | + | | Dossier de sponsoring AFUP | @reloadDbWithTestData @clearEmails @@ -48,4 +48,4 @@ Feature: Site Public - Devenir sponsor And I should only receive the following emails: | to | subject | | | forum - Nouvelle demande de dossier de sponsoring | - | | Dossier de sponsoring forum | + | | Dossier de sponsoring AFUP | diff --git a/translations/messages.en.yml b/translations/messages.en.yml index acc2bf2be..e04d0fcae 100644 --- a/translations/messages.en.yml +++ b/translations/messages.en.yml @@ -134,14 +134,14 @@ Billetterie: Ticketing "Que vous ayez une offre à promouvoir, un produit à présenter ou que vous souhaitiez soutenir l'open source,\n nous aurons une offre à vous proposer.": "Whether you have an offer to promote, a product to present or you want to support open source, we will have a sponsorship package to offer you." "Avec ou sans stand lors de l'évènement, nos différents niveaux de sponsoring vous permettent de trouver\n une offre qui correspond à vos attentes de visibilité tout en respectant votre budget.": "With or without a booth during the event, our different levels of sponsorship allow you to find an offer that meets your expectations of visibility while respecting your budget." "Pour les sponsors, cet évènement est l'occasion unique à Paris de rencontrer autant de développeur·se·s\n web dans un cadre convivial.": "For sponsors, this event is the unique opportunity in Paris to meet as many web developers in a friendly setting." -'mail.sponsoringfile.title': 'Sponsoring file %eventName%' +'mail.sponsoringfile.title': 'AFUP sponsoring file' 'mail.sponsoringfile.text': | Hello,
-

You have requested to receive the sponsorship file for the %eventName%.

+

You have requested to receive our sponsorship file.

You will find the file as an attachment. For any queries or specifications, do not hesitate to contact us by email at sponsors@afup.org.

-

Best regads,
+

Best regards,
The sponsoring team AFUP

Follow the AFUP on LinkedIn.

diff --git a/translations/messages.fr.yml b/translations/messages.fr.yml index 566e068b1..27ef3e7b6 100644 --- a/translations/messages.fr.yml +++ b/translations/messages.fr.yml @@ -182,10 +182,10 @@ type.3: "20 mn" 'Website': 'Site web' 'Language': 'Langue' 'Become a sponsor': 'Devenir sponsor' -'mail.sponsoringfile.title': 'Dossier de sponsoring %eventName%' +'mail.sponsoringfile.title': 'Dossier de sponsoring AFUP' 'mail.sponsoringfile.text': | Bonjour,
-

Vous avez demandé à recevoir le dossier de sponsoring pour le %eventName%.

+

Vous avez demandé à recevoir notre dossier de sponsoring.

Vous trouverez le dossier en pièce jointe. Pour toute demande de précisions ou devis, n'hésitez pas à nous contacter par mail à l’adresse sponsors@afup.org.