diff --git a/components/options_resolver.rst b/components/options_resolver.rst index 35e443d3d94..966ea9ec483 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -719,8 +719,11 @@ In same way, parent options can access to the nested options as normal arrays:: // ... ]); }); + $resolver->setDefault('profiling', function (Options $options): void { - return 'file' === $options['spool']['type']; + if ('file' === $options['spool']['type']) { + // ... + } }); } }