Skip to content

Commit

Permalink
fix: missing catch on next() call (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jun 25, 2024
1 parent 9d8cd5c commit 35b531b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/Mapping/Implementation/MappingFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,21 @@ class: get_class($transformer),
}
}

$supportedTransformation->next();
}
try {
$supportedTransformation->next();
} catch (InvalidClassException $e) {
$this->logger?->warning(
'Transformer "{transformer}" has a mapping involving an invalid class "{class}", skipping mapping definition from this transformer.',
[
'transformer' => get_class($transformer),
'class' => $e->getClass(),
],
);

// foreach ($supportedTransformation as $typeMapping) {
// }
// if the error happens here, we ignore
continue;
}
}
}

/**
Expand Down

0 comments on commit 35b531b

Please sign in to comment.