Support service/method tuples as indexable callbacks. Closures are also supported, although they cannot be injected by the service container. The indexable callback is now injected via a setter and validated when set (instead of during event processing).
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.
This makes the Populator service obsolete.
If provider definitions are not public, they will be removed by RemoveUnusedDefinitionsPass when compiling the container.
Since Provider instances do not know the index or type for which they are responsible, it's helpful for the ProviderRegistry to include that information when returning multiple providers.
* 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.
The original reset() method is now resetAllIndexes(). Additionally, new resetIndex() and resetIndexType() methods were introduced.
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).
Provide the default index name rather than the service itself. Additionally, inject references to each index by name instead of the definitions.