From c7051f99671386a7c4ec01e78ef7fdb81e3a24eb Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 29 Nov 2025 12:44:48 +0100 Subject: [PATCH] [OptionsResolver] setOptions callback should not return a value --- components/options_resolver.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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']) { + // ... + } }); } }