I'm getting an error in phpStorm in the ZF3 controller classes with the message:
Method 'flashMessenger' not found in ...Controller
At the same time it is working like a charm. But I would like this IDE not found error to be removed anyway.
The application was updated to ZF3 and I installed the flash messenger plugin found on Zendframework GitHub
Thanks for the help.
The error occurs because controller plugins aren't methods on the class, but classes themselves returned in the controller's
__callmethod.This means that the PhpStorm 'Undefined method' PHP inspection can't see the method in the class. It can be disabled in the settings under Editor -> Inspections -> PHP, but this will obviously stop the inspection from identifying actual errors as well.