forked from zendframework/zf2-documentation
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documented BC breaks/migration for PHP 7
Per zendframework/zendframework#7366, this updates documentation for all classes that were deprecated in 2.4 due to conflicts with PHP 7 keywords.
- Loading branch information
1 parent
2610707
commit cd8b766
Showing
10 changed files
with
144 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,45 @@ File Transport Usage | |
$transport->setOptions($options); | ||
$transport->send($message); | ||
.. _zend.mail.transport.quick-start.inmemory-usage: | ||
|
||
InMemory Transport Usage | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: php | ||
:linenos: | ||
use Zend\Mail\Message; | ||
use Zend\Mail\Transport\InMemory as InMemoryTransport; | ||
$message = new Message(); | ||
$message->addTo('[email protected]') | ||
->addFrom('[email protected]') | ||
->setSubject('Greetings and Salutations!') | ||
->setBody("Sorry, I'm going to be late today!"); | ||
// Setup InMemory transport | ||
$transport = new InMemoryTransport(); | ||
$transport->send($message); | ||
// Verify the message: | ||
$received = $transport->getLastMessage(); | ||
The InMemory transport is primarily of interest when in development or when | ||
testing. | ||
|
||
Migration from 2.0-2.3 to 2.4+ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Version 2.4 adds support for PHP 7. In PHP 7, ``null`` is a reserved keyword, | ||
which required renaming the ``Null`` transport. If you were using the ``Null`` transport | ||
directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on | ||
instantiation. Please update your code to refer to the ``InMemory`` class instead. | ||
|
||
Users pulling their ``Null`` transport instance from the transport factory | ||
(``Zend\Mail\Transport\Factory``) receive an ``InMemory`` instance instead | ||
starting in 2.4.0. | ||
|
||
.. _zend.mail.transport.options: | ||
|
||
Configuration Options | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.