Skip to content

Commit ef07e1a

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Fix the code example leading to an error
2 parents c0e8d75 + 1f3ebe6 commit ef07e1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configuration/micro_kernel_trait.rst

+1-1
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)