There is a way to define your own custom classes for documents in configuration in case one needs to override the default ones, however there are no interfaces for documents and the factories are inclined to return objects from Omni\Sylius\ElasticsearchPlugin\Document namespace as shown here: https://github.com/Sylius/SyliusElasticSearchPlugin/blob/5645ee98861f4b552a6b22fb7d3828b9b08ba932/src/Factory/Document/TaxonDocumentFactoryInterface.php#L13
This means that there is no way for me to completely override the document classes and I can only extend on defaults. But that denies me a possibility to locally fix the error comming from ill formed collection setter methods
There is a way to define your own custom classes for documents in configuration in case one needs to override the default ones, however there are no interfaces for documents and the factories are inclined to return objects from
Omni\Sylius\ElasticsearchPlugin\Document
namespace as shown here: https://github.com/Sylius/SyliusElasticSearchPlugin/blob/5645ee98861f4b552a6b22fb7d3828b9b08ba932/src/Factory/Document/TaxonDocumentFactoryInterface.php#L13 This means that there is no way for me to completely override the document classes and I can only extend on defaults. But that denies me a possibility to locally fix the error comming from ill formed collection setter methods