Skip to content

Commit 023911f

Browse files
committed
Reverted not necessary changes
1 parent 332f5b9 commit 023911f

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
@@ -18,6 +18,7 @@ a release.
1818
---
1919

2020
## [Unreleased]
21+
- Blameable/IpTraceable/SoftDeletable/Timestampable: Added functionality to use setter method instead of setting property values directly (#2644)
2122

2223
## [3.15.0]
2324
### Added
@@ -60,9 +61,6 @@ a release.
6061
- Fix bug collecting metadata for inherited mapped classes
6162

6263
## [3.12.0] - 2023-07-08
63-
### Added
64-
- Blameable/IpTraceable/SoftDeletable/Timestampable: Added functionality to use setter method instead of setting property values directly (#2644)
65-
6664
### Added
6765
- Tree: `setSibling()` and `getSibling()` methods in the `Node` interface through the BC `@method` annotation
6866
- 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)