Merge branch '3.2'

* 3.2:
  fix merge
  [2.8] Fix issues reported by static analyse
This commit is contained in:
Nicolas Grekas 2017-02-28 15:21:44 +01:00
commit 25d17345c0
3 changed files with 8 additions and 6 deletions

View File

@ -14,6 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Templating\TemplateNameParserInterface;
use Symfony\Component\Templating\TemplateReferenceInterface;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
/**

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\HttpKernel\EventListener;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

View File

@ -74,14 +74,14 @@ class YamlFileLoader extends FileLoader
$attributeMetadata->addGroup($group);
}
}
if (isset($data['max_depth'])) {
if (!is_int($data['max_depth'])) {
throw new MappingException(sprintf('The "max_depth" value must be an integer in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
}
$attributeMetadata->setMaxDepth($data['max_depth']);
if (isset($data['max_depth'])) {
if (!is_int($data['max_depth'])) {
throw new MappingException(sprintf('The "max_depth" value must be an integer in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
}
$attributeMetadata->setMaxDepth($data['max_depth']);
}
}
}