To make it works, I inject the serializer defined for the Type
into the fos_elastica.object_serializer_persister service.
This is the SAME service injected in the setSerializer of Type.
We deport the handling of serialization outside Elastica,
this is not so good but we need to build our own Documents to
get the ID's correctly.
While we could have used an abstract definition, its ID would likely conflict with the alias we set for the default client. Remove the abstract definition altogether and simply construct new definitions for each client. This resolves the previous issue where multiple clients would overwrite the constructor arguments of the previous definition.
Due to the naming of transformer, listener, and finder services, it's possible for index/type services to clobber the ID of another concrete or abstract service. This cannot be helped without breaking BC, but we should note it within the extension class.
By abstracting the property access, we can easily support Symfony 2.1's Form component and 2.2's PropertyAccess component.
The PropertyAccessor service will be injected into transformers if it is available. Tests were modified to do the same, and expect the appropriate exception depending on which implementation is available.
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Encapsulated Pagerfanta dependency for pagination and added support for knp pagination component
Added optional is_indexable_callback config param to persistence. If this is a method on the entity, the listener will only process it if the method returns true. Also updated documentation.
* Created AbstractProvider class (for all DB services), which handles the default batch_size option.
* The logger Closure is now optional for populate().
* Removed unused Elastica_Type argument from Provider constructors.
* Added unit tests for Doctrine's AbstractProvider class.
* The extra argument (ManagerRegistry) for Doctrine providers is now an appended constructor argument, so the extension no longer needs to use different replacement indexes for Propel/Doctrine providers.
This introduces a registry service for persistence providers.
Previously, tagging one or more provider services would cause AddProviderPass to clobber the default providers created by the bundle's extension class. Now, the extension class tags its created providers and allows them to be registered via RegisterProvidersPass just like custom providers.
BC break: Custom providers tagged "foq_elastica.provider" must now specify a "type" attribute on their tag. An "index" attribute is optional (the default ES index will be used by default).