yohang / Finite

A Simple PHP Finite State Machine

Home Page:http://yohan.giarel.li/Finite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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