# Emogrifier Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added ### Changed ### Deprecated ### Removed ### Fixed ## 2.2.0 ### Added - Add a `HtmlPruner` class ([#679](https://github.com/MyIntervals/emogrifier/pull/679)) - Add `AbstractHtmlProcessor::fromDomDocument` ([#676](https://github.com/MyIntervals/emogrifier/pull/676)) - Add `AbstractHtmlProcessor::fromHtml` ([#675](https://github.com/MyIntervals/emogrifier/pull/675)) ### Changed - Make the closures static ([#674](https://github.com/MyIntervals/emogrifier/pull/674)) - Keep `` elements by default with `CssInliner` ([#665](https://github.com/MyIntervals/emogrifier/pull/665)) - Make the `CssInliner` inherit `AbstractHtmlProcessor` ([#660](https://github.com/MyIntervals/emogrifier/pull/660)) - Separate `CssInliner::inlineCss` and the rendering ([#654](https://github.com/MyIntervals/emogrifier/pull/654)) ### Removed - Drop the removal of unprocessable tags from `CssInliner` ([#685](https://github.com/MyIntervals/emogrifier/pull/685)) - Drop the removal of invisible nodes from `CssInliner` ([#684](https://github.com/MyIntervals/emogrifier/pull/684)) ### Fixed - Remove opening `` tag from `body` content when element has attribute(s) ([#677](https://github.com/MyIntervals/emogrifier/issues/677), [#683](https://github.com/MyIntervals/emogrifier/pull/683)) - Keep development files out of the Composer packages ([#678](https://github.com/MyIntervals/emogrifier/pull/678)) - Call all static methods statically in `CssConcatenator` ([#670](https://github.com/MyIntervals/emogrifier/pull/670)) - Support all HTML5 self-closing tags, including ``, ``, `` and `` ([#653](https://github.com/MyIntervals/emogrifier/pull/653)) - Remove all "unprocessable" (e.g. ``) tags ([#650](https://github.com/MyIntervals/emogrifier/pull/650)) - Correct translated xpath of `:nth-child` selector ([#648](https://github.com/MyIntervals/emogrifier/pull/648)) ## 2.1.1 ### Changed - Add a test that a missing document type gets added ([#641](https://github.com/MyIntervals/emogrifier/pull/641)) ### Fixed - Keep the `style` element the `head` ([#642](https://github.com/MyIntervals/emogrifier/pull/642)) ## 2.1.0 ### Added - PHP 7.3 support ([#638](https://github.com/MyIntervals/emogrifier/pull/638)) - Allow PHP 7.3 in `composer.json` - Test in Travis for PHP 7.3 - Add a `renderBodyContent()` method ([#633](https://github.com/MyIntervals/emogrifier/pull/633)) - Add a `getDomDocument()` method ([#630](https://github.com/MyIntervals/emogrifier/pull/630)) - Add a Composer script for PHP CS Fixer ([#607](https://github.com/MyIntervals/emogrifier/pull/607)) - Copy matching rules with dynamic pseudo-classes or pseudo-elements in selectors to the style element ([#280](https://github.com/MyIntervals/emogrifier/issues/280), [#562](https://github.com/MyIntervals/emogrifier/pull/562), [#567](https://github.com/MyIntervals/emogrifier/pull/567)) - Add a CssToAttributeConverter ([#546](https://github.com/MyIntervals/emogrifier/pull/546)) - Expose the DOMDocument in AbstractHtmlProcessor ([#520](https://github.com/MyIntervals/emogrifier/pull/520)) - Add an HtmlNormalizer class ([#513](https://github.com/MyIntervals/emogrifier/pull/513), [#516](https://github.com/MyIntervals/emogrifier/pull/516)) - Add a CssInliner class ([#514](https://github.com/MyIntervals/emogrifier/pull/514), [#522](https://github.com/MyIntervals/emogrifier/pull/522)) - Composer scripts for the various CI build steps - Validate the composer.json on Travis ([#476](https://github.com/MyIntervals/emogrifier/pull/476)) ### Changed - Mark the work-in-progress classes as `@internal` ([#640](https://github.com/MyIntervals/emogrifier/pull/640)) - Remove the unprocessable tags from the DOM, not from the raw HTML ([#627](https://github.com/MyIntervals/emogrifier/pull/627)) - Reject empty HTML in `setHtml()` ([#622](https://github.com/MyIntervals/emogrifier/pull/622)) - Stop passing the DOM document around ([#618](https://github.com/MyIntervals/emogrifier/pull/618)) - Improve performance by using explicit namespaces for PHP functions ([#573](https://github.com/MyIntervals/emogrifier/pull/573), [#576](https://github.com/MyIntervals/emogrifier/pull/576)) - Add type hint checking to the code sniffs ([#566](https://github.com/MyIntervals/emogrifier/pull/566)) - Check the code with PHPMD ([#561](https://github.com/MyIntervals/emogrifier/pull/561)) - Add the cyclomatic complexity to the checked code sniffs ([#558](https://github.com/MyIntervals/emogrifier/pull/558)) - Use the Symfony CSS selector component ([#540](https://github.com/MyIntervals/emogrifier/pull/540)) ### Deprecated - Support for PHP 5.5 will be removed in Emogrifier 3.0. - Support for PHP 5.6 will be removed in Emogrifier 4.0. - The removal of invisible nodes will be removed in Emogrifier 3.0. ([#473](https://github.com/MyIntervals/emogrifier/pull/473)) - Converting CSS styles to (non-CSS) HTML attributes will be removed in Emogrifier 3.0. Please use the new CssToAttributeConverter instead. ([#474](https://github.com/MyIntervals/emogrifier/pull/474)) - Emogrifier 3.x.y will be the last release that supports usage without Composer (i.e., you can still require the class file). Starting with version 4.0, Emogrifier will only work with Composer. - The Emogrifier class will be superseded by CssInliner class in Emogrifier 3.0. For this, the Emogrifier class will be deprecated for version 3.0 and removed for version 4.0. ### Removed - Drop the `@version` PHPDoc annotations ([#637](https://github.com/MyIntervals/emogrifier/pull/637)) - Drop the destructors ([#619](https://github.com/MyIntervals/emogrifier/pull/619)) ### Fixed - Add required XML PHP extension to `composer.json` ([#614](https://github.com/MyIntervals/emogrifier/pull/614)) - Add required DOM PHP extension to `composer.json` ([#595](https://github.com/MyIntervals/emogrifier/pull/595)) - Escape hyphens in regular expressions ([#588](https://github.com/MyIntervals/emogrifier/pull/588)) - Fix Travis for PHP 5.x ([#589](https://github.com/MyIntervals/emogrifier/pull/589)) - Allow CSS between empty `@media` rule and another `@media` rule ([#534](https://github.com/MyIntervals/emogrifier/pull/534)) - Allow additional whitespace in media-query-list of disallowed `@media` rules ([#532](https://github.com/MyIntervals/emogrifier/pull/532)) - Allow multiple minified `@import` rules in the CSS without error (note: `@import`s are currently ignored, [#527](https://github.com/MyIntervals/emogrifier/pull/527)) - Style property ordering when multiple mixed individual and shorthand properties apply ([#511](https://github.com/MyIntervals/emogrifier/pull/511), [#508](https://github.com/MyIntervals/emogrifier/issues/508)) - Calculation of selector precedence for selectors involving pseudo-classes and/or attributes ([#502](https://github.com/MyIntervals/emogrifier/pull/502)) - Allow `@charset` in the CSS without error (note: its value is currently ignored, [#507](https://github.com/MyIntervals/emogrifier/pull/507)) - Allow attribute selectors in descendants ([#506](https://github.com/MyIntervals/emogrifier/pull/506), [#381](https://github.com/MyIntervals/emogrifier/issues/381)) - Allow adjacent sibling CSS selector combinator in minified CSS ([#505](https://github.com/MyIntervals/emogrifier/pull/505)) - Allow CSS property values containing newlines ([#504](https://github.com/MyIntervals/emogrifier/pull/504)) ## 2.0.0 ### Added - Support for CSS :not() selector ([#431](https://github.com/MyIntervals/emogrifier/pull/431)) - Automatically remove !important annotations from final inline style declarations ([#420](https://github.com/MyIntervals/emogrifier/pull/420)) - Automatically move `