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
-------
b173b81f46
Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
This commit is contained in:
commit
5f770d77e8
@ -108,7 +108,7 @@ EOF;
|
|||||||
*/
|
*/
|
||||||
private function getProxyClassName(Definition $definition)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user