[DomCrawler] Remove the overridden getHash() method to prevent problems when cloning the crawler
Overriding the SplObjectStorage::getHash() is affected by a PHP bug (https://bugs.php.net/bug.php?id=67582), which makes the Crawler unusable in Symfony 2.8 for anyone who relied on SplObjectStorage methods. Removing the getHash() method means we will no longer trigger the deprecation error. Given this method is unlikely to be used directly and other SplObjectStorage methods will trigger the error, it is the simplest thing we can do to maintain BC.
This commit is contained in:
parent
3c382c54c5
commit
3d7f6c69c2
@ -950,16 +950,6 @@ class Crawler extends \SplObjectStorage
|
|||||||
return parent::offsetGet($object);
|
return parent::offsetGet($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Using the SplObjectStorage API on the Crawler is deprecated as of 2.8 and will be removed in 3.0.
|
|
||||||
*/
|
|
||||||
public function getHash($object)
|
|
||||||
{
|
|
||||||
$this->triggerDeprecation(__METHOD__, true);
|
|
||||||
|
|
||||||
return parent::getHash($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the list of nodes with an XPath expression.
|
* Filters the list of nodes with an XPath expression.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user