Navigation Menu

Skip to content

Commit

Permalink
bug #25978 Deterministic proxy names (lstrojny)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Jan 31, 2018
2 parents 855be6a + b173b81 commit 5f770d7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -108,7 +108,7 @@ public function getProxyCode(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);
}

/**
Expand Down

0 comments on commit 5f770d7

Please sign in to comment.