8000 bug #25978 Deterministic proxy names (lstrojny) · symfony/symfony@5f770d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f770d7

Browse files
committed
bug #25978 Deterministic proxy names (lstrojny)
This PR was merged into the 3.4 branch. Discussion ---------- Deterministic proxy names Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random to better support reproducible builds. See #25958 | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- b173b81 Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
2 parents 855be6a + b173b81 commit 5f770d7

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