michaelgooden/phpstan-zend-mvc

Zend Framework 3 MVC controller plugin extension for PHPStan.

0.2.0 2018-01-24 13:14 UTC

This package is auto-updated.

Last update: 2024-11-29 05:20:58 UTC


README

Adds support to PHPStan to correctly handle controller plugins that are called using magic __call() in \Zend\Mvc\Controller\AbstractController and children.

Installation

  • Add michaelgooden/phpstan-zend-mvc as a require-dev Composer dependency
  • Add the following to phpstan.neon in your top-level app directory
services:
    -
        class: PHPStan\Reflection\ZendMvc\PluginClassReflectionExtension
        tags:
            - phpstan.broker.methodsClassReflectionExtension
  • Run PHPStan with the config file switch phpstan -c phpstan.neon