Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -16,6 +16,8 @@ namespace Symfony\Component\Serializer\Mapping;
*
* Primarily, the metadata stores serialization groups.
*
* @internal
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
interface AttributeMetadataInterface

View file

@ -14,7 +14,11 @@ namespace Symfony\Component\Serializer\Mapping;
/**
* Stores metadata needed for serializing and deserializing objects of specific class.
*
* Primarily, the metadata stores the list of attributes to serialize or deserialize.
* Primarily, the metadata stores the set of attributes to serialize or deserialize.
*
* There may only exist one metadata for each attribute according to its name.
*
* @internal
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/

View file

@ -27,10 +27,12 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
* @var LoaderInterface
*/
private $loader;
/**
* @var Cache
*/
private $cache;
/**
* @var array
*/

View file

@ -65,6 +65,7 @@ class YamlFileLoader extends FileLoader
if (isset($yaml['attributes']) && is_array($yaml['attributes'])) {
$attributesMetadata = $classMetadata->getAttributesMetadata();
foreach ($yaml['attributes'] as $attribute => $data) {
if (isset($attributesMetadata[$attribute])) {
$attributeMetadata = $attributesMetadata[$attribute];
@ -74,7 +75,15 @@ class YamlFileLoader extends FileLoader
}
if (isset($data['groups'])) {
if (!is_array($data['groups'])) {
throw new MappingException('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName());
}
foreach ($data['groups'] as $group) {
if (!is_string($group)) {
throw new MappingException('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName());
}
$attributeMetadata->addGroup($group);
}
}