Skip to content

Commit

Permalink
Merge pull request #46 from adrienbrault/gh-44
Browse files Browse the repository at this point in the history
Fix NullMetadata performance issue
  • Loading branch information
schmittjoh committed Jul 12, 2014
2 parents 72091ba + cc1f2b8 commit 22b7245
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Metadata/MetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ public function getMetadataForClass($className)
}

if (null !== $this->cache && !$this->debug) {
$this->cache->putClassMetadataInCache(new NullMetadata());
$this->cache->putClassMetadataInCache(new NullMetadata($class->getName()));
}
}

if (null === $metadata) {
$metadata = new NullMetadata();
$metadata = new NullMetadata($className);
}

return $this->filterNullMetadata($this->loadedMetadata[$className] = $metadata);
Expand Down
13 changes: 0 additions & 13 deletions src/Metadata/NullMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,5 @@
*/
class NullMetadata extends ClassMetadata
{
public function __construct()
{

}

public function serialize()
{
return '';
}

public function unserialize($str)
{

}
}

0 comments on commit 22b7245

Please sign in to comment.