From 9243072773f6d0161a3fd272b3c4656d41ae48ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 24 Nov 2020 15:45:28 +0100 Subject: [PATCH] Update pelago/emogrifier to 5.0 --- .../files/lib/system/api/composer.json | 2 +- .../files/lib/system/api/composer.lock | 25 +- .../system/api/composer/InstalledVersions.php | 6 +- .../lib/system/api/composer/installed.json | 27 +- .../lib/system/api/composer/installed.php | 6 +- .../system/api/pelago/emogrifier/CHANGELOG.md | 61 ++- .../system/api/pelago/emogrifier/README.md | 38 +- .../api/pelago/emogrifier/composer.json | 28 +- .../system/api/pelago/emogrifier/phpunit.xml | 12 + .../api/pelago/emogrifier/src/CssInliner.php | 352 +++++++++++++----- .../HtmlProcessor/AbstractHtmlProcessor.php | 26 +- .../HtmlProcessor/CssToAttributeConverter.php | 32 +- .../src/HtmlProcessor/HtmlPruner.php | 11 +- .../src/Utilities/CssConcatenator.php | 10 +- 14 files changed, 423 insertions(+), 213 deletions(-) create mode 100644 wcfsetup/install/files/lib/system/api/pelago/emogrifier/phpunit.xml diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index 24d419216d..bb275e6451 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -10,7 +10,7 @@ "require": { "ezyang/htmlpurifier": "4.13.*", "erusev/parsedown": "1.7.*", - "pelago/emogrifier": "4.0.*", + "pelago/emogrifier": "5.0.*", "chrisjean/php-ico": "1.0.*", "true/punycode": "~2.0", "pear/net_idna2": "^0.2.0", diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index 0f0ab507e9..736fc36318 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "88f8ac80c8e871d978df5d19cf119c8e", + "content-hash": "0930361ee03b18bc90818e4c0c6afddd", "packages": [ { "name": "chrisjean/php-ico", @@ -537,31 +537,28 @@ }, { "name": "pelago/emogrifier", - "version": "v4.0.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "f6fd679303c6e6861b5ff29af221f684729d8fd9" + "reference": "b43b650880d189b0ada61d95d0729c7424b1752d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/f6fd679303c6e6861b5ff29af221f684729d8fd9", - "reference": "f6fd679303c6e6861b5ff29af221f684729d8fd9", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/b43b650880d189b0ada61d95d0729c7424b1752d", + "reference": "b43b650880d189b0ada61d95d0729c7424b1752d", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4", - "symfony/css-selector": "^3.4.32 || ^4.3.5 || ^5.0" + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0", + "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.1" }, "require-dev": { - "grogy/php-parallel-lint": "^1.1.0", - "phpunit/phpunit": "^6.5.14", - "psalm/plugin-phpunit": "^0.5.8", - "slevomat/coding-standard": "^4.0.0", - "squizlabs/php_codesniffer": "^3.5.1", - "vimeo/psalm": "^3.2.12" + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "slevomat/coding-standard": "^6.4.1", + "squizlabs/php_codesniffer": "^3.5.8" }, "type": "library", "extra": { @@ -613,7 +610,7 @@ "issues": "https://github.com/MyIntervals/emogrifier/issues", "source": "https://github.com/MyIntervals/emogrifier" }, - "time": "2020-06-12T12:55:03+00:00" + "time": "2020-11-23T18:37:25+00:00" }, { "name": "psr/http-client", diff --git a/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php b/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php index 03e40ce82b..42ca8ce191 100644 --- a/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php +++ b/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php @@ -116,12 +116,12 @@ private static $installed = array ( ), 'pelago/emogrifier' => array ( - 'pretty_version' => 'v4.0.0', - 'version' => '4.0.0.0', + 'pretty_version' => 'v5.0.0', + 'version' => '5.0.0.0', 'aliases' => array ( ), - 'reference' => 'f6fd679303c6e6861b5ff29af221f684729d8fd9', + 'reference' => 'b43b650880d189b0ada61d95d0729c7424b1752d', ), 'psr/http-client' => array ( diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index 954c8fe154..86edc83094 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -558,34 +558,31 @@ }, { "name": "pelago/emogrifier", - "version": "v4.0.0", - "version_normalized": "4.0.0.0", + "version": "v5.0.0", + "version_normalized": "5.0.0.0", "source": { "type": "git", "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "f6fd679303c6e6861b5ff29af221f684729d8fd9" + "reference": "b43b650880d189b0ada61d95d0729c7424b1752d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/f6fd679303c6e6861b5ff29af221f684729d8fd9", - "reference": "f6fd679303c6e6861b5ff29af221f684729d8fd9", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/b43b650880d189b0ada61d95d0729c7424b1752d", + "reference": "b43b650880d189b0ada61d95d0729c7424b1752d", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4", - "symfony/css-selector": "^3.4.32 || ^4.3.5 || ^5.0" + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0", + "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.1" }, "require-dev": { - "grogy/php-parallel-lint": "^1.1.0", - "phpunit/phpunit": "^6.5.14", - "psalm/plugin-phpunit": "^0.5.8", - "slevomat/coding-standard": "^4.0.0", - "squizlabs/php_codesniffer": "^3.5.1", - "vimeo/psalm": "^3.2.12" - }, - "time": "2020-06-12T12:55:03+00:00", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "slevomat/coding-standard": "^6.4.1", + "squizlabs/php_codesniffer": "^3.5.8" + }, + "time": "2020-11-23T18:37:25+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index b2473602fa..34b82497ed 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -103,12 +103,12 @@ ), 'pelago/emogrifier' => array ( - 'pretty_version' => 'v4.0.0', - 'version' => '4.0.0.0', + 'pretty_version' => 'v5.0.0', + 'version' => '5.0.0.0', 'aliases' => array ( ), - 'reference' => 'f6fd679303c6e6861b5ff29af221f684729d8fd9', + 'reference' => 'b43b650880d189b0ada61d95d0729c7424b1752d', ), 'psr/http-client' => array ( diff --git a/wcfsetup/install/files/lib/system/api/pelago/emogrifier/CHANGELOG.md b/wcfsetup/install/files/lib/system/api/pelago/emogrifier/CHANGELOG.md index 37e336020b..3c455a1a6d 100644 --- a/wcfsetup/install/files/lib/system/api/pelago/emogrifier/CHANGELOG.md +++ b/wcfsetup/install/files/lib/system/api/pelago/emogrifier/CHANGELOG.md @@ -9,12 +9,71 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Changed +### Deprecated + +### Removed + +### Fixed + +## 5.0.0 + +### Added +- Add an `.editorconfig` file + ([#940](https://github.com/MyIntervals/emogrifier/pull/940)) +- Support PHP 8.0 + ([#926](https://github.com/MyIntervals/emogrifier/pull/926)) +- Run the CI build once a week + ([#933](https://github.com/MyIntervals/emogrifier/pull/933)) +- Move more development tools to PHIVE + ([#894](https://github.com/MyIntervals/emogrifier/pull/894), + [#907](https://github.com/MyIntervals/emogrifier/pull/907)) + +### Changed +- Automatically add a backslash for global functions + ([#909](https://github.com/MyIntervals/emogrifier/pull/909)) +- Update the development tools + ([#898](https://github.com/MyIntervals/emogrifier/pull/898), + [#895](https://github.com/MyIntervals/emogrifier/pull/895)) +- Upgrade to PHPUnit 7.5 + ([#888](https://github.com/MyIntervals/emogrifier/pull/888)) +- Enforce constant visibility + ([#892](https://github.com/MyIntervals/emogrifier/pull/892)) +- Rename the PHPCS configuration file + ([#891](https://github.com/MyIntervals/emogrifier/pull/891), + [#896](https://github.com/MyIntervals/emogrifier/pull/896)) +- Make use of PHP 7.1 language features + ([#883](https://github.com/MyIntervals/emogrifier/pull/883)) + ### Deprecated - Support for PHP 7.1 will be removed in Emogrifier 6.0. ### Removed +- Drop support for Symfony 4.3 and 5.0 + ([#936](https://github.com/MyIntervals/emogrifier/pull/936)) +- Stop checking `tests/` with Psalm + ([#885](https://github.com/MyIntervals/emogrifier/pull/885)) +- Drop support for PHP 7.0 + ([#880](https://github.com/MyIntervals/emogrifier/pull/880)) ### Fixed +- Fix a nonsensical code example in the README + ([#920](https://github.com/MyIntervals/emogrifier/issues/920), + [#935](https://github.com/MyIntervals/emogrifier/pull/935)) +- Remove `!important` from `style` attributes also when uppercase, mixed case or + having whitespace after `!` + ([#911](https://github.com/MyIntervals/emogrifier/pull/911)) +- Copy rules using `:...of-type` without a type to the `