From 283387a4ec615c3f7d0224322787bd61b5d1c943 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Wed, 23 Jul 2014 18:32:04 +0200 Subject: [PATCH] [Validator] Fixed memory leak in ValidatorBuilder --- .../Component/Validator/ValidatorBuilder.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 3f82ee2078..284f2a5b5b 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -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; @@ -367,20 +366,6 @@ class ValidatorBuilder implements ValidatorBuilderInterface 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;