callbacks in symfony yml do not work
Nemo64 opened this issue · comments
The callback configuration contains the key disabled
which is not present in the ArrayLoader
's OptionResolver
and causes this exception:
The option "disabled" does not exist. Defined options are: "do", "from", "on", "to".
Why is that option there anyways? If I would want to disable a callback i'd simply comment it out.
The disabled
option is used when overriding a callback definition. In application configuration for example. I'll fix this.
@Nemo64 this test https://github.com/yohang/Finite/blob/master/tests/Finite/Test/Bundle/FiniteBundle/DependencyInjection/FiniteFiniteExtensionTest.php#L46 ensures that what you describe shouldn't happen. Could you give me some context ?
@yohang I know that the problem was that the option resolver somehow got the disabled option. I try to reproduce it later, currently i have no time.
@Nemo64 I do have the same problem here. The OptionResolver does not know about the disabled Option and breaks. If I add
,
'disabled' => false
in Line 193 it works.
The problem seems to be that the OptionResolver needs to know all Options
Your test is working and so would my configuration if i use disabled:true in configuration, cause the OptionResolver is not used, cause the disabled callbacks are removed.
@yohang Can you please merge this into master, or let me know what is missing.