symfony/symfony — pull request #6376 by drak (2012-12-15 21:55:01+00:00)
Title: [DependencyInjection] Convenience: set() returns the set object.

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR:

Added convenience to method `set()` to return the object set, allowing inline object creation e.g.

$foo = $container->set('foo', new Foo());