Hello,
The below code should do the trick for you:
if ($template === 'order_conf') { $message->attach( (new Swift_Attachment())->setFilename('CGV.pdf') ->setContentType('application/pdf') ->setBody(file_get_contents(__DIR__ . '/CGV.pdf')) ); }
The attached screenshot highlights where the code should be placed.
Let me know if it works for you.
PS: This will pick up the CGV.pdf file from the current directory (classes)