10000 Proxy class names should be deterministic and independent of spl_obje… · symfony/symfony@b173b81 · GitHub
[go: up one dir, main page]

Skip to content

Commit b173b81

Browse files
committed
Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
1 parent 0023f4e commit b173b81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getProxyCode(Definition $definition)
108108
*/
109109
private function getProxyClassName(Definition $definition)
110110
{
111-
return preg_replace('/^.*\\\\/', '', $definition->getClass()).'_'.substr(hash('sha256', spl_object_hash($definition).$this->salt), -7);
111+
return preg_replace('/^.*\\\\/', '', $definition->getClass()).'_'.substr(hash('sha256', $definition->getClass().$this->salt), -7);
112112
}
113113

114114
/**

0 commit comments

Comments
 (0)
0