8000 Simplify api · symfony/symfony@b619459 · GitHub
[go: up one dir, main page]

Skip to content

Commit b619459

Browse files
committed
Simplify api
1 parent 762cf0d commit b619459

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/HttpKernel/Bundle/SimpleBundle.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ abstract class SimpleBundle extends Bundle implements ConfigurationInterface
3030
*/
3131
final public function getContainerExtension()
3232
{
33-
return new SimpleExtension($this, function (array $config, ContainerBuilder $container) {
34-
$this->buildContainer($config, $container);
35-
});
33+
return new SimpleExtension($this);
3634
}
3735

3836
/**
@@ -70,7 +68,9 @@ final class SimpleExtension extends Extension
7068
public function __construct(SimpleBundle $bundle, Closure $buildContainer)
7169
{
7270
$this->bundle = $bundle;
73-
$this->buildContainer = $buildContainer;
71+
$this->buildContainer = Closure::bind(function (array $config, ContainerBuilder $container) {
72+
$this->buildContainer($config, $container);
73+
}, $bundle, SimpleBundle::class]);
7474
}
7575

7676
/**

0 commit comments

Comments
 (0)
0