yohang / Finite

A Simple PHP Finite State Machine
http://yohan.giarel.li/Finite
MIT License
1.31k stars 188 forks source link

Override/Add transitions #52

Open kayue opened 10 years ago

kayue commented 10 years ago

Similar to #40, currently it is not possible to add new transitions to an existing graph. However states is able to extend from pervious config.

Another question, when I try to extend an existing graph, I must define class, property_path and graph again. Is this an expected behaviour?

finite_finite:
    sylius_order_shipping:
        class:         %sylius.model.order.class%
        property_path: shippingState
        graph:         sylius_order_shipping

ping @winzou

winzou commented 10 years ago

Are you sure? This is just symfony configuration. Transitions and states have names so it should be possible to override and add some. But state/transition deletion is not possible indeed.

yohang commented 10 years ago

Seems weird as config is merged by symfony.