Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callbacks in symfony yml do not work #113

Open
Nemo64 opened this issue Feb 19, 2016 · 5 comments
Open

callbacks in symfony yml do not work #113

Nemo64 opened this issue Feb 19, 2016 · 5 comments

Comments

@Nemo64
Copy link

Nemo64 commented Feb 19, 2016

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.

@yohang
Copy link
Owner

yohang commented Apr 17, 2016

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

@yohang
Copy link
Owner

yohang commented Apr 17, 2016

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

@Nemo64
Copy link
Author

Nemo64 commented Apr 18, 2016

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

@madaxel
Copy link

madaxel commented Jul 26, 2016

@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
Copy link

madaxel commented Aug 22, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants