Skip to content

Commit 5784407

Browse files
committed
fix mutators model issue
1 parent 7a38273 commit 5784407

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# CHANGELOG
22
All notable changes to this project will be documented in this file.
33

4-
## v1.2.0 (2021-04-09)
4+
## v1.2.2 (2021-04-16)
55
***
6-
### Added
7-
- Added PHPUnit 9 to requirements (Marc Prior).
6+
### Fixed
7+
- The mutator model was not set by default.
88

9-
## v1.2.0 (2021-04-02)
9+
## v1.2.1 (2021-04-02)
1010
***
1111
### Added
1212
- Added a new condition type: `\Zahran\Mapper\Condition\Missing`

src/DataModifier.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ protected function applyMutators(Attribute $attribute): void
6060
/** @var Mutator $mutatorModel */
6161
foreach ($attribute->getMutators() as $mutatorModel) {
6262
$mutatorInstance = Container::getInstance()->getMutator($mutatorModel);
63+
$mutatorInstance->setModel($mutatorModel);
6364
if (!is_array($value)) {
6465
$value = $mutatorInstance->apply($value, $mutatorModel->getArguments());
6566
}

0 commit comments

Comments
 (0)