Updating message to inform the user how to install the component

This commit is contained in:
Ryan Weaver 2017-12-26 18:37:15 -08:00 committed by Nicolas Grekas
parent cd6690dacd
commit 07ac535abf
1 changed files with 2 additions and 2 deletions

View File

@ -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);