Finite icon indicating copy to clipboard operation
Finite copied to clipboard

callbacks in symfony yml do not work

Open Nemo64 opened this issue 9 years ago • 5 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.

Nemo64 avatar Feb 19 '16 10:02 Nemo64

The disabled option is used when overriding a callback definition. In application configuration for example. I'll fix this.

yohang avatar Apr 17 '16 15:04 yohang

@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 avatar Apr 17 '16 15:04 yohang

@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 avatar Apr 18 '16 11:04 Nemo64

@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.

madaxel avatar Jul 26 '16 14:07 madaxel

@yohang Can you please merge this into master, or let me know what is missing.

madaxel avatar Aug 22 '16 16:08 madaxel