php-html-parser icon indicating copy to clipboard operation
php-html-parser copied to clipboard

Contract for DomInterface should contain a "__toString"

Open PWalkow opened this issue 5 years ago • 0 comments

Hi,

As currently PHPHtmlParser\DOM itself has the __toString() method and it is the only access to gather the content after processing it, can we add it to the publicly visible contract so we could use it in tests/mocks/specs etc?

PS. Probably at some point it should just extend \Stringable in php8 but so far it's missing __toString(). (https://php.watch/versions/8.0/stringable)

Thank you!

PWalkow avatar Dec 16 '20 14:12 PWalkow