FSM icon indicating copy to clipboard operation
FSM copied to clipboard

Use __construct() constructor

Open GDmac opened this issue 10 years ago • 2 comments

I namespaced fsm.php into my own application library, and bumped into a constructor issue. new lib\FSM('START', $this->payload); doesn't actually set initialstate and currentstate, because the FSM() method is not seen as a constructor.

Maybe it is time to start php 5.0 compatibility and use __construct() :-)

GDmac avatar Aug 19 '15 07:08 GDmac

I'd accept a pull request that moves this package to PHP 5+.

jparise avatar Aug 19 '15 16:08 jparise

We should probably move to PSR4. This means rewriting examples, tests and documentation as well.

GDmac avatar Aug 26 '15 08:08 GDmac