Skip to content

Commit

Permalink
Moved phpseclib, mcrypt_compat, Cm_RedisSession, Cm_Cache_Backend_Red…
Browse files Browse the repository at this point in the history
…is and Pelago_Emogrifier to composer (#2411)
  • Loading branch information
fballiano authored Dec 3, 2022
1 parent 8ec52e6 commit a3a54fd
Show file tree
Hide file tree
Showing 40 changed files with 764 additions and 39,270 deletions.
9 changes: 7 additions & 2 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@

Varien_Autoload::register();

include_once "phpseclib/bootstrap.php";
include_once "mcryptcompat/mcrypt.php";
/** AUTOLOADER PATCH **/
if (file_exists($autoloaderPath = BP . DS . 'vendor/autoload.php') ||
file_exists($autoloaderPath = BP . DS . '../vendor/autoload.php')
) {
require $autoloaderPath;
}
/** AUTOLOADER PATCH **/

This comment has been minimized.

Copy link
@sreichel

sreichel Dec 6, 2022

Contributor

This should not be there?!?

This comment has been minimized.

Copy link
@fballiano

fballiano Dec 7, 2022

Author Contributor

probaly the fact that this pr was open for so long with so many comments did this trick to us


/* Support additional includes, such as composer's vendor/autoload.php files */
foreach (glob(BP . DS . 'app' . DS . 'etc' . DS . 'includes' . DS . '*.php') as $path) {
Expand Down
695 changes: 0 additions & 695 deletions app/code/community/Cm/RedisSession/Model/Session.php

This file was deleted.

48 changes: 0 additions & 48 deletions app/code/community/Cm/RedisSession/etc/config.xml

This file was deleted.

11 changes: 4 additions & 7 deletions app/code/core/Mage/Core/Model/Email/Template/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,10 @@ protected function _applyInlineCss($html)
// Only run Emogrify if HTML exists
if (strlen($html) && $inlineCssFile) {
$cssToInline = $this->_getCssFileContent($inlineCssFile);
$emogrifier = new Pelago_Emogrifier();
$emogrifier->setHtml($html);
$emogrifier->setCss($cssToInline);
// Don't parse inline <style> tags, since existing tag is intentionally for no-inline styles
$emogrifier->setParseInlineStyleTags(false);

$processedHtml = $emogrifier->emogrify();
$emogrifier = \Pelago\Emogrifier\CssInliner::fromHtml($html)
->inlineCss($cssToInline)
->disableInlineStyleAttributesParsing();
$processedHtml = $emogrifier->render();
} else {
$processedHtml = $html;
}
Expand Down
8 changes: 0 additions & 8 deletions app/etc/modules/Cm_RedisSession.xml

This file was deleted.

7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
"ext-simplexml": "*",
"ext-soap": "*",
"ext-zlib": "*",
"magento-hackathon/magento-composer-installer": "^3.1 || ^2.1 || ^4.0"
"colinmollenhour/cache-backend-redis": "^1.14",
"colinmollenhour/magento-redis-session": "^3.0",
"magento-hackathon/magento-composer-installer": "^3.1 || ^2.1 || ^4.0",
"pelago/emogrifier": "^6.0",
"phpseclib/mcrypt_compat": "^2.0.3",
"phpseclib/phpseclib": "^3.0.14"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
Expand Down
Loading

0 comments on commit a3a54fd

Please sign in to comment.