You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the master branch. Commits ------- 6cd1fd4 [DependencyInjection] removed hard dependency on the Config component Discussion ---------- [DependencyInjection] removed hard dependency on the Config component The Config component is a hard dependency for the loaders (but loaders themselves are optional); all other classes should not have a hard dep on Config. The introduction of a new flag allows to remove this dependency. This commit also fixes skipped test dependencies. --------------------------------------------------------------------------- by fabpot at 2012-12-28T09:47:13Z As there is only one location where we are directly using a class from the Config component (`ContainerBuilder::addObjectResource()`), we can also just test this case and do nothing if the class does not exist instead of adding a flag, but that looks dirty. ```php public function addObjectResource($object) { if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { return $this; } $parent = new \ReflectionObject($object); do { $this->addResource(new FileResource($parent->getFileName())); } while ($parent = $parent->getParentClass()); return $this; } ``` What do you think?
$this->assertEquals(array('bar' => 'foo', 'foo' => 'bar'), $container->getParameterBag()->all(), '->merge() merges current parameters with the loaded ones');
$this->assertEquals(array('bar' => 'foo', 'foo' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones');
$this->assertEquals(array('bar' => 'foo', 'foo' => 'foo', 'baz' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones');
0 commit comments