in Blog, Errata, Tutorials, Zend, ZF2

savePost() must be compatible with Blog\Service\PostServiceInterface

Errata from the Zend Framework 2 Blog Tutorial

Fatal error: Declaration of Blog\Service\PostService::savePost() must be compatible with Blog\Service\PostServiceInterface::savePost(Blog\Model\PostInterface $blog)

https://framework.zend.com/manual/2.4/en/in-depth-guide/zend-form-zend-form-fieldset.html

Fix by adding:

use Blog\Model\PostInterface;

must-be-compatible-postinterface