Skip to content
Merged
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require" : {
"php": ">=7.0",
"swiftmailer/swiftmailer": "^5.1",
"swiftmailer/swiftmailer": "^5.1 || ^6.0",
"tijsverkoyen/css-to-inline-styles": "^2.1"
},
"require-dev" : {
Expand Down
176 changes: 146 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/src/CssInlinerPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function setUp()
$this->emailRaw = file_get_contents($dir.'emailRaw.html');
$this->emailConverted = file_get_contents($dir.'emailConverted.html');

$this->mailer = Swift_Mailer::newInstance(Swift_NullTransport::newInstance());
$this->mailer = new Swift_Mailer(new Swift_NullTransport);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for both 5.1 and 6.0 as newInstance was really just a proxy method to __construct

$this->mailer->registerPLugin(new CssInlinerPlugin());
}

Expand All @@ -44,7 +44,7 @@ public function setUp()
*/
private function createMessage()
{
$message = Swift_Message::newInstance();
$message = new Swift_Message();

$message->setFrom('[email protected]');
$message->setTo('[email protected]');
Expand Down Expand Up @@ -109,7 +109,7 @@ public function testInjectedConverterIsUsedInsteadOfDefault()
$message = $this->createMessage();
$message->setContentType('text/html');

$mailer = Swift_Mailer::newInstance(Swift_NullTransport::newInstance());
$mailer = new Swift_Mailer(new Swift_NullTransport);
$mailer->registerPlugin(new CssInlinerPlugin($converterStub));
$mailer->send($message);
}
Expand Down