updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
@@ -79,7 +79,7 @@ class AnnotationLoader implements LoaderInterface
$metadata->addConstraint($constraint);
} elseif ($constraint instanceof Constraint) {
if (preg_match('/^(get|is|has)(.+)$/i', $method->name, $matches)) {
$metadata->addGetterConstraint(lcfirst($matches[2]), $constraint);
$metadata->addGetterMethodConstraint(lcfirst($matches[2]), $matches[0], $constraint);
} else {
throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get", "is" or "has".', $className, $method->name));
}
+2 -8
View File
@@ -84,7 +84,7 @@ class XmlFileLoader extends FileLoader
$options = array();
}
} elseif (strlen((string) $node) > 0) {
$options = trim($node);
$options = XmlUtils::phpize(trim($node));
} else {
$options = null;
}
@@ -182,13 +182,7 @@ class XmlFileLoader extends FileLoader
return simplexml_import_dom($dom);
}
/**
* Loads the validation metadata from the given XML class description.
*
* @param ClassMetadata $metadata The metadata to load
* @param array $classDescription The XML class description
*/
private function loadClassMetadataFromXml(ClassMetadata $metadata, $classDescription)
private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription)
{
if (count($classDescription->{'group-sequence-provider'}) > 0) {
$metadata->setGroupSequenceProvider(true);
+3 -9
View File
@@ -46,13 +46,7 @@ class YamlFileLoader extends FileLoader
$this->yamlParser = new YamlParser();
}
// This method may throw an exception. Do not modify the class'
// state before it completes
if (false === ($classes = $this->parseFile($this->file))) {
return false;
}
$this->classes = $classes;
$this->classes = $this->parseFile($this->file);
if (isset($this->classes['namespaces'])) {
foreach ($this->classes['namespaces'] as $alias => $namespace) {
@@ -111,7 +105,7 @@ class YamlFileLoader extends FileLoader
*
* @param string $path The path of the YAML file
*
* @return array|null The class descriptions or null, if the file was empty
* @return array The class descriptions
*
* @throws \InvalidArgumentException If the file could not be loaded or did
* not contain a YAML array
@@ -126,7 +120,7 @@ class YamlFileLoader extends FileLoader
// empty file
if (null === $classes) {
return;
return array();
}
// not an array