From b173b81f46cae887be1255be60ec687222b1af72 Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Tue, 30 Jan 2018 22:52:03 +0100 Subject: [PATCH] Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random --- .../Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index 1ec900b84b..2b827324fa 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -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); } /**