php-shell/CHANGELOG.md

1.3 KiB

Changelog and Upgrade Instructions

0.2.x to 0.3.x

Major changes:

  • The Shell::EV_* constants have been renamed to Shell::EVT_*.
  • The configure method has been removed. If you really need to extend the Shell class, use the constructor to configure your shell (see examples/timers.php)
  • Events are now dispatched using the NoccyLabs/TinyEvent library. The main difference here is in how the event object received. The shell instance is now passed in the object, and you can provide any userdata to be passed on to the handler when you add the listener.
  • The event Shell::EVT_BAD_COMMAND will be fired if a command can not be found, assuming Context->execute() does not accept the command. (see examples/commandevents.php)
  • When calling Context->addCommand() you can now use both help and descr as the last argument to provide the description text for the command. This change is intended to make addCommand and the doccomment @descr more similar.

New features:

  • Tasks can now be added and removed from the shell. Tasks will receive a call to their update() method once per main loop, until they are removed or return false from the isValid() method. Tasks need to implement the TaskInterface interface. (see examples/tasks.php)