Skip to content

Commit af0e04d

Browse files
committed
Update 5.3 migration guide
Refs cakephp/cakephp#18703
1 parent 37ee7f9 commit af0e04d

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

en/appendices/5-3-migration-guide.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,15 @@ Console
5858
Database
5959
--------
6060

61-
- Added ``Query::getDriver()`` helper which returns the ``Driver`` for the current connection
61+
- Added ``Query::getDriver()`` helper which returns the ``Driver`` for the current connection
6262
role by default.
6363

64+
Mailer
65+
------
66+
67+
- Added ``Message::addAttachment()`` for adding attachments to a message. Like
68+
other message methods, it can be accessed via the ``Mailer`` instance as ``$mailer->addAttachment()``.
69+
6470
Routing
6571
-------
6672

en/core-libraries/email.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ you want the filenames to appear in the recipient's mail client:
278278
a string using the ``data`` option. This allows you to attach files without
279279
needing file paths to them.
280280

281+
.. php:method:: addAttachment(\Psr\Http\Message\UploadedFileInterface|string $path, ?string $name, ?string $mimetype, ?string $contentId, ?bool $contentDisposition)
282+
283+
You can also add attachments using the ``addAttachment()`` method.
284+
285+
$mailer->addAttachment('/full/file/path/file.png');
286+
281287
Relaxing Address Validation Rules
282288
---------------------------------
283289

0 commit comments

Comments
 (0)