minor #17620 [FrameworkBundle] fix container cache key generation (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] fix container cache key generation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

If the actual class name were not taken into, we would not be able to
detect inconsistencies between the different configuration formats (PHP,
YAML, and XML) as the container built based on the first evaluated
configuration format would be cached and reused by tests for the other
formats too.

Commits
-------

29750e5 fix container cache key generation
This commit is contained in:
Fabien Potencier 2016-01-31 08:38:33 +01:00
commit 9cdb2074ce
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ abstract class FrameworkExtensionTest extends TestCase
protected function createContainerFromFile($file, $data = array())
{
$cacheKey = md5($file.serialize($data));
$cacheKey = md5(get_class($this).$file.serialize($data));
if (isset(self::$containerCache[$cacheKey])) {
return self::$containerCache[$cacheKey];
}