Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Event/Sponsorship/SponsorshipLeadMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down
4 changes: 2 additions & 2 deletions tests/behat/features/PublicSite/Sponsor.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: Site Public - Devenir sponsor
And I should only receive the following emails:
| to | subject |
| <sponsors@afup.org> | forum - Nouvelle demande de dossier de sponsoring |
| <email@domain.com> | Dossier de sponsoring forum |
| <email@domain.com> | Dossier de sponsoring AFUP |

@reloadDbWithTestData
@clearEmails
Expand All @@ -48,4 +48,4 @@ Feature: Site Public - Devenir sponsor
And I should only receive the following emails:
| to | subject |
| <sponsors@afup.org> | forum - Nouvelle demande de dossier de sponsoring |
| <email@domain.com> | Dossier de sponsoring forum |
| <email@domain.com> | Dossier de sponsoring AFUP |
6 changes: 3 additions & 3 deletions translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,<br />
<p>You have requested to receive the sponsorship file for the %eventName%.</p>
<p>You have requested to receive our sponsorship file.</p>

<p>You will find the file as an attachment. For any queries or specifications, do not hesitate to contact us by email at
<a href="mailto:sponsors@afup.org">sponsors@afup.org</a>.</p>
<p>Best regads,<br />
<p>Best regards,<br />
The sponsoring team AFUP</p>

<p>Follow the AFUP on <a href="https://www.linkedin.com/company/afup/">LinkedIn</a>.</p>
Expand Down
4 changes: 2 additions & 2 deletions translations/messages.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,<br />
<p>Vous avez demandé à recevoir le dossier de sponsoring pour le %eventName%.</p>
<p>Vous avez demandé à recevoir notre dossier de sponsoring.</p>

<p>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 <a href="mailto:sponsors@afup.org">sponsors@afup.org</a>.</p>
Expand Down
Loading