nelmio/alice — pull request #27 by croshchupkin (2013-03-19 16:51:27+00:00)
Title: Allow the creation of new Loader instance for each differing combination of options in Fixtures::getLoader()

The following pull request makes sense when we are using nelmio/alice for loading fixtures in unit tests. Without the changes introduced by this pull request, some of the perfectly valid tests for a symfony2-based project I'm working on would fail.

The reason behind this was that the loaders are stored in a static variable, which means that they are shared between unit tests in several bundles.
The bundles that use nelmio/alice had had their fixtures described in YAML, and were also passing different custom provider classes into Fixtures::load(). Unfortunately, a single loader was created for the very first bundle, and, in all consecutive calls to Fixtures::load(), the loader for the first bundle was being returned, ignoring all of the new options. This resulted in the custom provider's methods used in the latter fixtures not being available (because the loader still used only the custom provider from the first bundle, which was no longer needed).

TL;DR: I won't be able to merge my branch with new features (and additional YAML fixtures) into my company project's trunk until this pull request is accepted :). Please, give your opinion on the changes that I made.