PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 24, 2022

[FIXED] Zend Framework 2 Skeleton Application home page error

 January 24, 2022     composer-php, php, zend-framework2     No comments   

Issue

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/" }
     }
}

Solution

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).



Answered By - Andon Totev
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing