fabpot/Pimple — pull request #137 by peterwardle (2014-05-29 08:06:23+00:00)
Title: Customize ServiceProvider with options

Documented that values passed to Container::register could be used to customize the ServiceProvider.

Values were not passed to ServiceProvider and were instead added to the Container but after the ServiceProvider is registered preventing their use on registration.

Adding these values to the Container results in pollution of the Container with configuration values only relevant to the ServiceProvider.

Container::register preformed multiple actions/responsiblities register a ServiceProvider and also register an array of key/values.

Updated so that options are passed on to the ServiceProvider on registration to customize the ServiceProvider and in isolation from the Container.

- Modified ServiceProviderInterface::register signature to receive options array (optional)
- Modified Container::register signature to satisfy ServiceProviderInterface
- Updated tests to reflect functionality