Skip to content

Commit 62912e6

Browse files
committed
Change wording to be a bit more explicit with @versioned
1 parent 7881dce commit 62912e6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/Gedmo/Loggable/Mapping/Driver/Annotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function readExtendedMetadata($meta, array &$config)
6868
// versioned property
6969
if ($this->reader->getPropertyAnnotation($property, self::VERSIONED)) {
7070
if (!$this->isMappingValid($meta, $field)) {
71-
throw new InvalidMappingException("Cannot versioned [{$field}] as it is collection in object - {$meta->name}");
71+
throw new InvalidMappingException("Cannot apply versioning to field [{$field}] as it is collection in object - {$meta->name}");
7272
}
7373
if (isset($meta->embeddedClasses[$field])) {
7474
$this->inspectEmbeddedForVersioned($field, $config, $meta);

lib/Gedmo/Loggable/Mapping/Driver/Yaml.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function readExtendedMetadata($meta, array &$config)
4949
if (isset($fieldMapping['gedmo'])) {
5050
if (in_array('versioned', $fieldMapping['gedmo'])) {
5151
if ($meta->isCollectionValuedAssociation($field)) {
52-
throw new InvalidMappingException("Cannot versioned [{$field}] as it is collection in object - {$meta->name}");
52+
throw new InvalidMappingException("Cannot apply versioning to field [{$field}] as it is collection in object - {$meta->name}");
5353
}
5454
// fields cannot be overrided and throws mapping exception
5555
$config['versioned'][] = $field;
@@ -63,7 +63,7 @@ public function readExtendedMetadata($meta, array &$config)
6363
if (isset($fieldMapping['gedmo'])) {
6464
if (in_array('versioned', $fieldMapping['gedmo'])) {
6565
if ($meta->isCollectionValuedAssociation($field)) {
66-
throw new InvalidMappingException("Cannot versioned [{$field}] as it is collection in object - {$meta->name}");
66+
throw new InvalidMappingException("Cannot apply versioning to field [{$field}] as it is collection in object - {$meta->name}");
6767
}
6868
// fields cannot be overrided and throws mapping exception
6969
$config['versioned'][] = $field;
@@ -77,7 +77,7 @@ public function readExtendedMetadata($meta, array &$config)
7777
if (isset($fieldMapping['gedmo'])) {
7878
if (in_array('versioned', $fieldMapping['gedmo'])) {
7979
if ($meta->isCollectionValuedAssociation($field)) {
80-
throw new InvalidMappingException("Cannot versioned [{$field}] as it is collection in object - {$meta->name}");
80+
throw new InvalidMappingException("Cannot apply versioning to field [{$field}] as it is collection in object - {$meta->name}");
8181
}
8282
// fields cannot be overrided and throws mapping exception
8383
$config['versioned'][] = $field;
@@ -91,7 +91,7 @@ public function readExtendedMetadata($meta, array &$config)
9191
if (isset($fieldMapping['gedmo'])) {
9292
if (in_array('versioned', $fieldMapping['gedmo'])) {
9393
if ($meta->isCollectionValuedAssociation($field)) {
94-
throw new InvalidMappingException("Cannot versioned [{$field}] as it is collection in object - {$meta->name}");
94+
throw new InvalidMappingException("Cannot apply versioning to field [{$field}] as it is collection in object - {$meta->name}");
9595
}
9696
// fields cannot be overrided and throws mapping exception
9797
$config['versioned'][] = $field;
@@ -105,7 +105,7 @@ public function readExtendedMetadata($meta, array &$config)
105105
if (isset($fieldMapping['gedmo'])) {
106106
if (in_array('versioned', $fieldMapping['gedmo'])) {
107107
if ($meta->isCollectionValuedAssociation($field)) {
108-
throw new InvalidMappingException("Cannot versioned [{$field}] as it is collection in object - {$meta->name}");
108+
throw new InvalidMappingException("Cannot apply versioning to field [{$field}] as it is collection in object - {$meta->name}");
109109
}
110110
// fields cannot be overrided and throws mapping exception
111111
$mapping = $this->_getMapping($fieldMapping['class']);

0 commit comments

Comments
 (0)