-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
In the documentation I can read this about DataPersisters:
Custom data persisters can be used to do so. A project can include as many data persisters as it needs. The first able to persist data for a given resource will be used.
However in ChainDataPersister class, persist and remove method executes all persisters than supports the entity:
/**
* {@inheritdoc}
*/
public function persist($data)
{
foreach ($this->persisters as $persister) {
if ($persister->supports($data)) {
$data = $persister->persist($data) ?? $data;
}
}
return $data;
}
This could be a bug or the documentation is wrong?