Skip to content

Commit b8818b6

Browse files
committed
Reverted not necessary changes
1 parent 0f4649b commit b8818b6

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ a release.
2121
### Added
2222
- SoftDeleteable: `Gedmo\SoftDeleteable\Event\PreSoftDeleteEventArgs` and
2323
`Gedmo\SoftDeleteable\Event\PostSoftDeleteEventArgs` classes.
24+
- Blameable/IpTraceable/SoftDeletable/Timestampable: Added functionality to use setter method instead of setting property values directly (#2644)
2425

2526
### Deprecated
2627
- Do not add type-hinted parameters `Gedmo\SoftDeleteable\Event\PreSoftDeleteEventArgs` and
@@ -48,9 +49,6 @@ a release.
4849
- Fix bug collecting metadata for inherited mapped classes
4950

5051
## [3.12.0] - 2023-07-08
51-
### Added
52-
- Blameable/IpTraceable/SoftDeletable/Timestampable: Added functionality to use setter method instead of setting property values directly (#2644)
53-
5452
### Added
5553
- Tree: `setSibling()` and `getSibling()` methods in the `Node` interface through the BC `@method` annotation
5654
- Tree: Support array of fields and directions in the `$sortByField` and `$direction` parameters at `AbstractTreeRepository::recover()`

src/Blameable/Mapping/Driver/Annotation.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,13 @@ public function readExtendedMetadata($meta, array &$config)
4646
$class = $this->getMetaReflectionClass($meta);
4747
// property annotations
4848
foreach ($class->getProperties() as $property) {
49-
if (
50-
isset($meta->associationMappings[$property->name]['inherited'])
51-
|| ($meta->isMappedSuperclass && !$property->isPrivate())
49+
if ($meta->isMappedSuperclass && !$property->isPrivate()
5250
|| $meta->isInheritedField($property->name)
51+
|| isset($meta->associationMappings[$property->name]['inherited'])
5352
) {
5453
continue;
5554
}
5655
if ($blameable = $this->reader->getPropertyAnnotation($property, self::BLAMEABLE)) {
57-
assert($blameable instanceof Blameable);
58-
5956
$field = $property->getName();
6057

6158
if (!$meta->hasField($field) && !$meta->hasAssociation($field)) {

src/IpTraceable/Mapping/Driver/Annotation.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ public function readExtendedMetadata($meta, array &$config)
4444
$class = $this->getMetaReflectionClass($meta);
4545
// property annotations
4646
foreach ($class->getProperties() as $property) {
47-
if (
48-
isset($meta->associationMappings[$property->name]['inherited'])
49-
|| ($meta->isMappedSuperclass && !$property->isPrivate())
47+
if ($meta->isMappedSuperclass && !$property->isPrivate()
5048
|| $meta->isInheritedField($property->name)
49+
|| isset($meta->associationMappings[$property->name]['inherited'])
5150
) {
5251
continue;
5352
}
5453
if ($ipTraceable = $this->reader->getPropertyAnnotation($property, self::IP_TRACEABLE)) {
55-
assert($ipTraceable instanceof IpTraceable);
56-
5754
$field = $property->getName();
5855

5956
if (!$meta->hasField($field)) {

src/SoftDeleteable/Mapping/Driver/Annotation.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public function readExtendedMetadata($meta, array &$config)
3737
$class = $this->getMetaReflectionClass($meta);
3838
// class annotations
3939
if (null !== $class && $annot = $this->reader->getClassAnnotation($class, self::SOFT_DELETEABLE)) {
40-
assert($annot instanceof SoftDeleteable);
41-
4240
$config['softDeleteable'] = true;
4341

4442
Validator::validateField($meta, $annot->fieldName);

src/Timestampable/Mapping/Driver/Annotation.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@ public function readExtendedMetadata($meta, array &$config)
5454
$class = $this->getMetaReflectionClass($meta);
5555
// property annotations
5656
foreach ($class->getProperties() as $property) {
57-
if (
58-
isset($meta->associationMappings[$property->name]['inherited'])
59-
|| ($meta->isMappedSuperclass && !$property->isPrivate())
57+
if ($meta->isMappedSuperclass && !$property->isPrivate()
6058
|| $meta->isInheritedField($property->name)
59+
|| isset($meta->associationMappings[$property->name]['inherited'])
6160
) {
6261
continue;
6362
}
6463
if ($timestampable = $this->reader->getPropertyAnnotation($property, self::TIMESTAMPABLE)) {
65-
assert($timestampable instanceof Timestampable);
6664
$field = $property->getName();
6765
if (!$meta->hasField($field)) {
6866
throw new InvalidMappingException("Unable to find timestampable [{$field}] as mapped property in entity - {$meta->getName()}");

0 commit comments

Comments
 (0)