Skip to content

Commit d6d6612

Browse files
weaverryannicolas-grekas
authored andcommitted
Updating message to inform the user how to install the component
1 parent dc84784 commit d6d6612

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Crawler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,8 @@ public function filterXPath($xpath)
691691
*/
692692
public function filter($selector)
693693
{
694-
if (!class_exists('Symfony\\Component\\CssSelector\\CssSelectorConverter')) {
695-
throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).');
694+
if (!class_exists(CssSelectorConverter::class)) {
695+
throw new \RuntimeException('To filter with a CSS selector, install the CssSelector component ("composer require symfony/css-selector"). Or use filterXpath instead.');
696696
}
697697

698698
$converter = new CssSelectorConverter($this->isHtml);

0 commit comments

Comments
 (0)