Wikia/app — pull request #751 by relwell (2013-05-07 08:21:29+00:00)
Title: Stricter search config

Our search config used to use magic methods and array access to store basically any value. This is a problem, because it makes it hard to track and document attributes corresponding to configuration values that may play an important role in our search library.

The search config has been updated to use concrete attributes with accessors and mutators for all applicable configuration values. It uses the ArrayConfigurable trait to allow instantiating a config instance using an associative array, while still calling all necessary mutators (which are responsible for pre-/post-processing for a number of values).

We also used this as an opportunity to remove duplicate features (e.g. isInterWiki vs. interWiki params) and simplify how we handle dynamic instantiation of query services by making the config responsible for storing what it thinks the current query service should be, based on its current settings.

Unit tests have been updated to pass, but there are a handful of TODOs introduced here to update the search config tests and return it to 100% code coverage.

Since we also want to merge https://github.com/Wikia/app/pull/750, we need to do one first, and then update the other, since these are going to introduce merge conflicts, specifically in terms of how we handle query service instantiation through the factory. I'd suggest merging this one first, since the previous has less changes, and it should be easier to update.