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
@@ -60,7 +60,7 @@ public function readExtendedMetadata($meta, array &$config)
60
60
foreach ($class->getProperties() as$property) {
61
61
$field = $property->getName();
62
62
63
-
if ($this->reader->getPropertyAnnotation($property, Versioned::class)) {
63
+
if ($this->reader->getPropertyAnnotation($property, KeepRevisions::class)) {
64
64
if ($meta->isCollectionValuedAssociation($field)) {
65
65
thrownewInvalidMappingException(sprintf('Cannot version field %s::$%s, collection valued associations are not supported.', $meta->getName(), $field));
66
66
}
@@ -103,7 +103,7 @@ public function readExtendedMetadata($meta, array &$config)
103
103
if (!$meta->isMappedSuperclass && $config) {
104
104
// The revisionable flag must be set, except for embedded models, and the versioned config should be a non-empty array
105
105
if (isset($config['versionedFields']) && !isset($config['revisionable']) && !$this->isEmbed($meta)) {
106
-
thrownewInvalidMappingException(sprintf('Class "%s" has "%s" annotated fields but is missing the "%s" class annotation.', $meta->getName(), Versioned::class, Revisionable::class));
106
+
thrownewInvalidMappingException(sprintf('Class "%s" has "%s" annotated fields but is missing the "%s" class annotation.', $meta->getName(), KeepRevisions::class, Revisionable::class));
107
107
}
108
108
}
109
109
@@ -121,7 +121,7 @@ public function readExtendedMetadata($meta, array &$config)
Copy file name to clipboardExpand all lines: src/Revisionable/Mapping/Driver/Xml.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ public function readExtendedMetadata($meta, array &$config)
68
68
if (!$meta->isMappedSuperclass && $config) {
69
69
// The revisionable flag must be set, except for embedded models, and the versioned config should be a non-empty array
70
70
if (isset($config['versionedFields']) && (!$this->isEmbed($meta) && !isset($config['revisionable']))) {
71
-
thrownewInvalidMappingException(sprintf("Class '%s' has fields with the 'gedmo:versioned' element but the class does not have the 'gedmo:revisionable' element.", $meta->getName()));
71
+
thrownewInvalidMappingException(sprintf("Class '%s' has fields with the 'gedmo:keep-revisions' element but the class does not have the 'gedmo:revisionable' element.", $meta->getName()));
72
72
}
73
73
}
74
74
@@ -127,7 +127,7 @@ private function inspectElementForVersioned(\SimpleXMLElement $element, array $c
Copy file name to clipboardExpand all lines: src/Revisionable/Mapping/Driver/Yaml.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ public function readExtendedMetadata($meta, array &$config)
67
67
if (!$meta->isMappedSuperclass && $config) {
68
68
// The revisionable flag must be set, except for embedded models, and the versioned config should be a non-empty array
69
69
if (isset($config['versionedFields']) && !isset($config['revisionable'])) {
70
-
thrownewInvalidMappingException(sprintf("Class '%s' has fields marked as versioned but the class does not have the 'revisionable' configuration.", $meta->getName()));
70
+
thrownewInvalidMappingException(sprintf("Class '%s' has fields marked with the 'keepRevisions' property but the class does not have the 'revisionable' configuration.", $meta->getName()));
71
71
}
72
72
}
73
73
@@ -140,7 +140,7 @@ private function inspectConfigurationForVersioned(array $mapping, array $config,
140
140
continue;
141
141
}
142
142
143
-
if (in_array('versioned', $fieldMapping['gedmo'], true)) {
143
+
if (in_array('keepRevisions', $fieldMapping['gedmo'], true)) {
144
144
if ($meta->isCollectionValuedAssociation($field)) {
145
145
thrownewInvalidMappingException(sprintf('Cannot version field %s::$%s, collection valued associations are not supported.', $meta->getName(), $field));
0 commit comments