Dilhan Nakandala
Dilhan Nakandala

Reputation: 363

Zend Framework 2 Skeleton Application home page error

I am new to Zend Framework 2 and successfully configured skeleton sample application. I was following the steps in the tutorial given in the site http://framework.zend.com/manual/current/en/user-guide/routing-and-controllers.html upto adding a controller and view pages. However I am getting this error when I try to go to app's home page.

Catchable fatal error: Argument 1 passed to Zend\View\HelperPluginManager::__construct() must implement interface Interop\Container\ContainerInterface, none given, called in C:\xampp\htdocs\skeleton\vendor\zendframework\zend-mvc\src\Service\AbstractPluginManagerFactory.php on line 32 and defined in C:\xampp\htdocs\skeleton\vendor\zendframework\zend-view\src\HelperPluginManager.php on line 241

I am stuck and can not find a solution, can somebody please help me? I wonder if this occurs after I ran composer update, my application's composer.json looks like this.

{
    "name": "zendframework/skeleton-application",
    "description": "Skeleton Application for ZF2",
    "license": "BSD-3-Clause",
    "keywords": [
        "framework",
        "zf2"
    ],
    "homepage": "http://framework.zend.com/",
    "require": {
        "php": ">=5.5",
        "zendframework/zendframework": "~2.5"
    },
     "autoload": {
         "psr-0": { "Album": "module/Album/src/" }
     }
}

Upvotes: 2

Views: 696

Answers (1)

Andon Totev
Andon Totev

Reputation: 304

Just had this problem. This is a confirmed bug in zend-view 2.6 - https://github.com/zendframework/zend-view/issues/43. For the moment I've resolved this by using:

"zendframework/zend-view": "2.5.*"

in composer.json

EDIT: You can use version >= 2.6.2 (2.6.1 had problem too).

Upvotes: 1

Related Questions