Skip to content

Commit

Permalink
[Validator] Fixed memory leak in ValidatorBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
webmozart committed Jul 23, 2014
1 parent 4c97420 commit 283387a
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/Symfony/Component/Validator/ValidatorBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Validator;

use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Cache\ArrayCache;
Expand Down Expand Up @@ -367,20 +366,6 @@ public function getValidator()

if ($this->annotationReader) {
$loaders[] = new AnnotationLoader($this->annotationReader);

AnnotationRegistry::registerLoader(function ($class) {
if (0 === strpos($class, __NAMESPACE__.'\\Constraints\\')) {
$file = str_replace(__NAMESPACE__.'\\Constraints\\', __DIR__.'/Constraints/', $class).'.php';

if (is_file($file)) {
require_once $file;

return true;
}
}

return false;
});
}

$loader = null;
Expand Down

0 comments on commit 283387a

Please sign in to comment.