Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random

This commit is contained in:
Lars Strojny 2018-01-30 22:52:03 +01:00
parent 0023f4e84d
commit b173b81f46

View File

@ -108,7 +108,7 @@ EOF;
*/
private function getProxyClassName(Definition $definition)
{
return preg_replace('/^.*\\\\/', '', $definition->getClass()).'_'.substr(hash('sha256', spl_object_hash($definition).$this->salt), -7);
return preg_replace('/^.*\\\\/', '', $definition->getClass()).'_'.substr(hash('sha256', $definition->getClass().$this->salt), -7);
}
/**