Skip to content

Commit 62304f4

Browse files
author
Oleksii Korshenko
authored
MAGETWO-87124: Update the Emogrifier dependency to ^2.0.0 magento#13132
2 parents 116c0d7 + df32857 commit 62304f4

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"composer/composer": "1.4.1",
4343
"monolog/monolog": "^1.17",
4444
"oyejorge/less.php": "~1.7.0",
45-
"pelago/emogrifier": "1.2.0",
45+
"pelago/emogrifier": "^2.0.0",
4646
"tubalmartin/cssmin": "4.1.0",
4747
"magento/magento-composer-installer": ">=0.1.11",
4848
"braintree/braintree_php": "3.25.0",

composer.lock

Lines changed: 24 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ public function inlinecssDirectiveDataProvider()
352352
false,
353353
true,
354354
],
355-
'Production mode - File with compilation error results in unmodified markup' => [
355+
'Production mode - File with compilation error results in structurally unmodified markup' => [
356356
'<html><p></p> {{inlinecss file="css/file-with-error.css"}}</html>',
357-
'<html><p></p> </html>',
357+
'<p></p>',
358358
true,
359359
],
360360
'Developer mode - File with compilation error results in error message' => [

lib/internal/Magento/Framework/Css/PreProcessor/Adapter/CssInliner.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Framework\Css\PreProcessor\Adapter;
77

8+
use Magento\Framework\App\State;
89
use Pelago\Emogrifier;
910

1011
/**
@@ -17,9 +18,13 @@ class CssInliner
1718
*/
1819
private $emogrifier;
1920

20-
public function __construct()
21+
/**
22+
* @param State $appState
23+
*/
24+
public function __construct(State $appState)
2125
{
2226
$this->emogrifier = new Emogrifier();
27+
$this->emogrifier->setDebug($appState->getMode() === State::MODE_DEVELOPER);
2328
}
2429

2530
/**

0 commit comments

Comments
 (0)