symfony/symfony — pull request #7212 by jfsimon (2013-02-28 10:34:59+00:00)
Title: [Finder] adds adapter selection/unselection capabilities

As we have many issues with the native finder adapter, it would be good to:
* permit selection of a particular adapter which will be choosed over the others until its unselection
* permit unselection of adapters to get the finder select trhe best on (by priority)
* have `PhpAdapter` selected by default

This PR adds 2 methods to the `Finder`:
* `setAdapter(AdapterInterface $adapter, $priority = 0)`: selects an adapter (adds it if not alreday registered)
* `useBestAdapter()`: tells the finder to select best adapter by their priority

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes