When creating a CssSelector or XPathQuery instance with invalid selector/query syntax, an InvalidDomQueryException is now immediately thrown. This change is considered to be not only non-breaking, but actually a fix, because the CssSelector would otherwise throw an exception later when the apply() method is called. The XPathQuery would silently return no result without notifying you of the invalid query and generate a PHP warning.
When creating a
CssSelector
orXPathQuery
instance with invalid selector/query syntax, anInvalidDomQueryException
is now immediately thrown. This change is considered to be not only non-breaking, but actually a fix, because theCssSelector
would otherwise throw an exception later when theapply()
method is called. TheXPathQuery
would silently return no result without notifying you of the invalid query and generate a PHP warning.