Commit graph

264 commits

Author SHA1 Message Date
Jeremy Mikola 86cdaa7c3c [Listener] Support additional indexable callback types
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).
2012-04-16 12:30:30 -04:00
Jeremy Mikola 78a36c196d [Listener] Use common AbstractListenerTest for ORM and MongoDB ODM 2012-04-16 12:29:25 -04:00
r1pp3rj4ck 0f46f4b96d [Listener] Allow conditional indexing based on callback method
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.
2012-04-10 14:36:25 -04:00
Jeremy Mikola 3863b2dba8 Merge pull request #92 from Exercise/suggested-deps
Add suggested Doctrine and Propel deps for test suite coverage
2012-04-10 11:35:41 -07:00
Jeremy Mikola 22789c1b01 Add suggested Doctrine and Propel deps for test suite coverage 2012-04-10 14:35:08 -04:00
Jeremy Mikola 24ca952d46 Update service tag for Doctrine MongoDB ODM listeners
See: doctrine/DoctrineMongoDBBundle#80
2012-03-23 15:02:00 -04:00
Jeremy Mikola 661c324e43 Merge pull request #80 from Exercise/repopulate-index
Allow single indexes and types to be repopulated
2012-03-13 10:48:07 -07:00
Jeremy Mikola 23cfb31651 Update documentation for custom provider services 2012-03-13 13:44:49 -04:00
Jeremy Mikola 15bcca4e7e Fix documentation for persistence "identifier" option 2012-03-13 13:42:27 -04:00
Jeremy Mikola f559700766 Fix typo in Doctrine/AbstractProviderTest 2012-03-12 14:13:54 -04:00
Jeremy Mikola 02f162fd79 Update Elastica dependency for Resetter changes
Resetter depends on Elastica_Type::delete(), which was a recent addition to Elastica. See: af6c92b92e5374f92323a65cb6ea957b74fcb1dd
2012-03-12 12:08:53 -04:00
Jeremy Mikola 4a80e27283 Enable PopulateCommand to target indexes and types
This makes the Populator service obsolete.
2012-03-12 12:07:51 -04:00
Jeremy Mikola 2046748516 [Provider] Lazy-loaded provider services must have public definitions
If provider definitions are not public, they will be removed by RemoveUnusedDefinitionsPass when compiling the container.
2012-03-12 12:07:51 -04:00
Jeremy Mikola 118900120b [Provider] ProviderRegistry should return indexed provider arrays
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.
2012-03-12 12:07:51 -04:00
Jeremy Mikola e09225eb09 [Provider] Change provider construction (possible BC break)
* 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.
2012-03-12 12:07:51 -04:00
Jeremy Mikola 89a368ae35 Allow Resetter to target specific indexes and types (BC break)
The original reset() method is now resetAllIndexes(). Additionally, new resetIndex() and resetIndexType() methods were introduced.
2012-03-12 12:07:51 -04:00
Jeremy Mikola 2d2e209373 Remove obsolete MappingRegistry class 2012-03-12 12:07:51 -04:00
Jeremy Mikola b360a36737 [Provider] Create ProviderRegistry service (BC break)
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).
2012-03-12 12:07:51 -04:00
Jeremy Mikola 43eda480c5 Rename "reseter" to "Resetter" (BC break) 2012-03-12 12:07:51 -04:00
Jeremy Mikola d3a2335a55 Refactor IndexManager construction (preserves API)
Provide the default index name rather than the service itself. Additionally, inject references to each index by name instead of the definitions.
2012-03-12 12:07:51 -04:00
Jeremy Mikola 494b73a860 [Command] Refactor foq:elastica:search configuration 2012-03-12 12:07:51 -04:00
Richard Miller 9046d4d137 Merge branch '2.0' 2012-03-08 12:50:13 +00:00
Richard Miller 45747a3e1f Removed code coverage from travisci config 2012-03-08 12:49:30 +00:00
Richard Miller 41f18a47af Merge branch '2.0'
Conflicts:
	composer.json
2012-03-07 10:20:24 +00:00
Richard Miller 1f8993557b Added symfony/console to composer.json 2012-03-07 10:18:25 +00:00
Jeremy Mikola b60256e8fd Merge branch '2.0' 2012-03-06 20:34:30 -05:00
Jeremy Mikola 0391dff44e Configure Travis CI
This also changes the test suite and bootstrap to depend on packages installed by composer.
2012-03-06 20:33:50 -05:00
Jeremy Mikola 3eb923cc84 Skip Doctrine tests if libraries are not available 2012-03-06 20:22:34 -05:00
Jeremy Mikola ebeff1aae4 Update composer.json to require Symfony 2.1 2012-03-03 22:48:22 -05:00
Jeremy Mikola b7d7017381 Merge branch '2.0' 2012-03-03 22:48:10 -05:00
Jeremy Mikola 62c410f464 Revise composer.json and require Symfony 2.0 explicitly 2012-03-03 22:46:34 -05:00
Jeremy Mikola 95eb2f8ba0 Add MIT license 2012-03-03 22:45:28 -05:00
daFish 67d44a767d Add composer support. 2012-03-03 22:34:16 -05:00
Richard Miller 3e50cc95b5 Merge branch '2.0' 2012-02-27 20:13:39 +00:00
Richard Miller 901aba1bba Merge remote-tracking branch 'origin/2.0' into 2.0 2012-02-27 20:12:50 +00:00
Richard Miller 118151db7c Added null_value to mapping configuration 2012-02-27 20:11:25 +00:00
Richard Miller 2e5bac1f52 Removed filtering of null values in transformer 2012-02-27 19:37:59 +00:00
Jeremy Mikola 7a9255a9ed Merge remote-tracking branch 'origin/2.0' 2012-02-25 17:41:18 -05:00
Jeremy Mikola da463e23ea Merge pull request #75 from merk/hybrid
[POC] Hybrid finder results
2012-02-24 14:31:59 -08:00
Richard Miller 86e5afc469 Merge branch '2.0' 2012-02-24 09:51:51 +00:00
Tim Nagel 76f447ba7d Hybrid finder results 2012-02-24 09:50:46 +11:00
Richard Miller 4baefe6686 Fixed normalizing values twice in transfomer 2012-02-15 10:27:03 +00:00
Richard Miller a81d878d93 Stopped null values going into transformed data 2012-02-15 10:02:16 +00:00
Richard Miller a3f4c95e9c Changed to only filter truly null value in Transformer 2012-02-14 17:08:38 +00:00
Richard Miller d67cd8f9ba Merge remote-tracking branch 'origin/2.0' 2012-02-03 12:40:42 +00:00
Richard Miller 5e19a37344 Merge pull request #67 from richardmiller/fixing_doctrine_removal
Fixing issue with removing mapped Doctrine entities/documents
2012-02-02 13:59:18 -08:00
Richard Miller 81bd07a90b Updated identifier field fetching in listener 2012-02-02 19:37:49 +00:00
Richard Miller 1d2887a83b Cleaned up doctrine removal fix changes 2012-01-26 09:59:58 +00:00
Richard Miller 65be0a415e Fixing issue with removing mapped Doctrine entities/documents 2012-01-25 19:51:10 +00:00
Richard Miller 9a6ce35fb6 Merge branch '2.0' 2012-01-25 14:16:10 +00:00