Updating message to inform the user how to install the component
This commit is contained in:
parent
cd6690dacd
commit
07ac535abf
@ -691,8 +691,8 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*/
|
||||
public function filter($selector)
|
||||
{
|
||||
if (!class_exists('Symfony\\Component\\CssSelector\\CssSelectorConverter')) {
|
||||
throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).');
|
||||
if (!class_exists(CssSelectorConverter::class)) {
|
||||
throw new \RuntimeException('To filter with a CSS selector, install the CssSelector component ("composer require symfony/css-selector"). Or use filterXpath instead.');
|
||||
}
|
||||
|
||||
$converter = new CssSelectorConverter($this->isHtml);
|
||||
|
Reference in New Issue
Block a user