The DomQuery class (parent of CssSelector (Dom::cssSelector) and XPathQuery (Dom::xPath)) has a new method formattedText() that uses the new crwlr/html-2-text package to convert the HTML to formatted plain text. You can also provide a customized instance of the Html2Text class to the formattedText() method.
Also added a lot of missing throws doblock tags in the whole codebase and adapted PHP CS Fixer config a little.
The
DomQuery
class (parent ofCssSelector
(Dom::cssSelector
) andXPathQuery
(Dom::xPath
)) has a new methodformattedText()
that uses the new crwlr/html-2-text package to convert the HTML to formatted plain text. You can also provide a customized instance of theHtml2Text
class to theformattedText()
method.Also added a lot of missing throws doblock tags in the whole codebase and adapted PHP CS Fixer config a little.