Skip to content

Commit 8bf5f9e

Browse files
qzminskijaviereguiluz
authored andcommitted
Fix the code example leading to an error
1 parent 5404ee4 commit 8bf5f9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configuration/micro_kernel_trait.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ add a service conditionally based on the ``foo`` value::
236236
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
237237
{
238238
if ($config['foo']) {
239-
$container->set('foo_service', new \stdClass());
239+
$builder->register('foo_service', \stdClass::class);
240240
}
241241
}
242242
}

0 commit comments

Comments
 (0)