Skip to content

Commit 1f3ebe6

Browse files
committed
minor #17270 Fix the code example leading to an error (qzminski)
This PR was squashed before being merged into the 6.1 branch. Discussion ---------- Fix the code example leading to an error Commits ------- 8bf5f9e Fix the code example leading to an error
2 parents 4374617 + 8bf5f9e commit 1f3ebe6

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
@@ -274,7 +274,7 @@ add a service conditionally based on the ``foo`` value::
274274
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
275275
{
276276
if ($config['foo']) {
277-
$container->set('foo_service', new \stdClass());
277+
$builder->register('foo_service', \stdClass::class);
278278
}
279279
}
280280
}

0 commit comments

Comments
 (0)