wit-php
wit-php copied to clipboard
Compatible error in ActionMapping::action()
I'm getting the following error when I tried to implement ActionMapping.
MyActionMapping::action() must be compatible with Tgallice\\Wit\\ActionMapping::action($sessionId, $actionName, Tgallice\\Wit\\Model\\Context $context, array $entities = Array)
I implemented the function as you mentioned in the example:
public function action($sessionId, Context $context, Action $step)
Also i tried
public function action($sessionId, $actionName, \Tgallice\Wit\Model\Context $context, $entities = array()
What could be wrong here? My php version is 5.6.27
Thanks, Unnikrishnan B.