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
minor symfony#58585 Rename annotations to attributes in AttributeLoader (alamirault)
This PR was merged into the 7.2 branch.
Discussion
----------
Rename annotations to attributes in `AttributeLoader`
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License | MIT
Annotations are not supported anymore in AttributeLoader, so we can rename some variables
Commits
-------
9ab0752 [Serializer] Rename annotations to attributes in AttributeLoader
thrownewMappingException(\sprintf('Groups on "%s::%s()" cannot be added. Groups can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name));
133
133
}
134
134
135
-
foreach ($annotation->getGroups() as$group) {
135
+
foreach ($attribute->getGroups() as$group) {
136
136
$attributeMetadata->addGroup($group);
137
137
}
138
-
} elseif ($annotationinstanceof MaxDepth) {
138
+
} elseif ($attributeinstanceof MaxDepth) {
139
139
if (!$accessorOrMutator) {
140
140
thrownewMappingException(\sprintf('MaxDepth on "%s::%s()" cannot be added. MaxDepth can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name));
thrownewMappingException(\sprintf('SerializedName on "%s::%s()" cannot be added. SerializedName can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name));
thrownewMappingException(\sprintf('SerializedPath on "%s::%s()" cannot be added. SerializedPath can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name));
thrownewMappingException(\sprintf('Context on "%s::%s()" cannot be added. Context can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name));
Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummyAdditionalGetterWithoutIgnoreAttributes.php
0 commit comments