Skip to content

Releases: phpmentors-jp/stagehand-fsm

Stagehand_FSM 2.6.0 (stable)

17 Jan 07:50
v2.6.0
Compare
Choose a tag to compare

What's New in Stagehand_FSM 2.6.0

New minimum required Symfony version

(@iteman)

As of this version, Symfony 2.8.0 or 3.0.0 or 4.0.0 or greater is required.

Stagehand_FSM 2.5.0 (stable)

10 Mar 05:46
v2.5.0
Compare
Choose a tag to compare

What's New in Stagehand_FSM 2.5.0

New minimum required Symfony version

(Issue #24)

As of this version, Symfony 2.8.0 or greater is required.

Stagehand_FSM 2.4.0 (stable)

12 Jul 03:33
v2.4.0
Compare
Choose a tag to compare

Release Date: 2015-07-12 UTC

What's New in Stagehand_FSM 2.4.0

New interface to get the transition log

(Issue #21)

StateMachineInterface::getTransitionLog() has been added to get the transition log of a state machine.

StateMachineInterface::queueEvent() throwing exception on the ended machine

(Issue #17)

StateMachineInterface::queueEvent() will throw an exception after the state machine is ended.

StateMachineInterface::isEnded()

(Issue #16)

StateMachineInterface::isEnded() returns whether the state machine is ended or not.

StateMachineInterface::isActive()

(Issue #14)

StateMachineInterface::isActive() returns whether the state machine is active or not.

Stagehand_FSM 2.3.0 (stable)

18 Feb 05:28
v2.3.0
Compare
Choose a tag to compare

Release Date: 2015-02-18 UTC

What's New in Stagehand_FSM 2.3.0

Transition logging

(Issue #13)

A StateMachine instance logs of all state transitions as a collection of TransitionLog objects. You can get the logs using StageMachine::getTransitionLogs().

Stagehand_FSM 2.2.0 (stable)

03 Feb 02:23
v2.2.0
Compare
Choose a tag to compare

Release Date: 2015-02-03 UTC

What's New in Stagehand_FSM 2.2.0

Live migration support

(Issue #11)

Stagehand_FSM 2.1.0 (stable) broke backward compatibility of serialized objects for v2.0.0. This feature allows v2.0.0 objects to migrate to v2.2.0 objects at run time.

New interfaces

(Issue #8, #10)

Two interfaces have been added as the following:

Stagehand_FSM 2.1.0 (stable)

05 Oct 06:06
v2.1.0
Compare
Choose a tag to compare

Release Date: 2014-10-05

What's New in Stagehand_FSM 2.1.0

User-defined event dispatcher for the state machine events

(Issue #7)

Stagehand_FSM has the following events and hooks that can be used to trigger custom behavior in your application. Those events can be viewed in StateMachineEvents.

Constant Name Value Timing
EVENT_PROCESS statemachine.process Before processing an event
EVENT_EXIT statemachine.exit Before leaving a state
EVENT_TRANSITION statemachine.transition Before invoking a transition action and changing the current state
EVENT_ENTRY statemachine.entry Before entering a state
EVENT_DO statemachine.do Before invoking an activity

End of PEAR support for Stagehand_FSM

(Issue #5)

As of this version, Stagehand_FSM is no longer provided as a PEAR package.

Stagehand_FSM 2.0.0 (stable)

01 Nov 03:23
v2.0.0
Compare
Choose a tag to compare

Release Date: 2013-08-01

What's New in Stagehand_FSM 2.0.0

Migration to PHP 5.3

(Issue #2)

Stagehand_FSM has been migrated to PHP 5.3. As of this version, it only works with PHP 5.3.2+.

New and Improved API

(Issue #3)

Stagehand_FSM v2 has introduced new and improved API. The following code shows how to create a state machine and how to activate the state machine.

<?php
use Stagehand\FSM\StateMachine\StateMachineBuilder;

$stateMachineBuilder = new StateMachineBuilder();
$stateMachineBuilder->addState('locked');
$stateMachineBuilder->addState('unlocked');
$stateMachineBuilder->setStartState('locked');
$stateMachineBuilder->addTransition('locked', 'insertCoin', 'unlocked');
$stateMachineBuilder->addTransition('unlocked', 'pass', 'locked');
$stateMachine = $stateMachineBuilder->getStateMachine();

$stateMachine->start();
echo $stateMachine->getCurrentState()->getStateID() . PHP_EOL; // "locked"
$stateMachine->triggerEvent('insertCoin');
echo $stateMachine->getCurrentState()->getStateID() . PHP_EOL; // "unlocked"
$stateMachine->triggerEvent('pass');
echo $stateMachine->getCurrentState()->getStateID() . PHP_EOL; // "locked"

For more information, see the StateMachineTest class.

End of Support for Nested State Machine and History Marker

(Issue #4)

Stagehand_FSM v2 no longer supports Nested State Machine and History Marker.