Skip to content

Commit 574a41c

Browse files
[Mime] rename Part/BodyFile to Part/File
1 parent 69ee97a commit 574a41c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Mime/WrappedTemplatedEmail.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace Symfony\Bridge\Twig\Mime;
1313

1414
use Symfony\Component\Mime\Address;
15-
use Symfony\Component\Mime\Part\BodyFile;
1615
use Symfony\Component\Mime\Part\DataPart;
16+
use Symfony\Component\Mime\Part\File;
1717
use Twig\Environment;
1818

1919
/**
@@ -40,7 +40,7 @@ public function toName(): string
4040
public function image(string $image, string $contentType = null): string
4141
{
4242
$file = $this->twig->getLoader()->getSourceContext($image);
43-
$body = $file->getPath() ? new BodyFile($file->getPath()) : $file->getCode();
43+
$body = $file->getPath() ? new File($file->getPath()) : $file->getCode();
4444
$this->message->addPart((new DataPart($body, $image, $contentType))->asInline());
4545

4646
return 'cid:'.$image;
@@ -49,7 +49,7 @@ public function image(string $image, string $contentType = null): string
4949
public function attach(string $file, string $name = null, string $contentType = null): void
5050
{
5151
$file = $this->twig->getLoader()->getSourceContext($file);
52-
$body = $file->getPath() ? new BodyFile($file->getPath()) : $file->getCode();
52+
$body = $file->getPath() ? new File($file->getPath()) : $file->getCode();
5353
$this->message->addPart(new DataPart($body, $name, $contentType));
5454
}
5555

0 commit comments

Comments
 (0)