You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -78,14 +77,91 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata)
78
77
}
79
78
}
80
79
80
+
if (isset($data['methods'])) {
81
+
if (!\is_array($data['methods'])) {
82
+
thrownewMappingException(sprintf('The "methods" key must be an array in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
83
+
}
84
+
85
+
foreach ($data['methods'] as$methods) {
86
+
if (isset($methods['accessor'])) {
87
+
if (!\is_string($methods['accessor'])) {
88
+
thrownewMappingException(sprintf('The value of "methods.accessor" must be a in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
thrownewMappingException(sprintf('The value of "methods.mutator" must be a in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
thrownewMappingException(sprintf('The "exclude" value must be a boolean in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
105
+
}
106
+
107
+
$attributeMetadata->setExclude($data['exclude']);
108
+
}
109
+
110
+
if (isset($data['expose'])) {
111
+
if (!\is_bool($data['expose'])) {
112
+
thrownewMappingException(sprintf('The "expose" value must be a boolean in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
113
+
}
114
+
115
+
$attributeMetadata->setExpose($data['expose']);
116
+
}
117
+
81
118
if (isset($data['max_depth'])) {
82
119
if (!\is_int($data['max_depth'])) {
83
120
thrownewMappingException(sprintf('The "max_depth" value must be an integer in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
thrownewMappingException(sprintf('The "read_only" value must be a boolean in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
thrownewMappingException(sprintf('The "serialized_name" value must be a string in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
thrownewMappingException(sprintf('The "type" value must be a string in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
145
+
}
146
+
147
+
$attributeMetadata->setReadOnly($data['type']);
148
+
}
149
+
}
150
+
}
151
+
152
+
if (isset($yaml['exclusion_policy'])) {
153
+
if (!\is_string($yaml['exclusion_policy'])) {
154
+
thrownewMappingException(sprintf('The "exclusion_policy" value must be a string in "%s" for the class "%s".', $this->file, $classMetadata->getName()));
0 commit comments