ZF2-184: Inexistent injection parameters are ignored

Description


return array(
    'di' => array(
        'instance' => array(
            'Zend\Mvc\Controller\ActionController' => array(
                'parameters' => array(
                    'broker'       => 'Zend\Mvc\Controller\PluginBroker',
                    'montypythons' =>  'holygrail'
                ),
            )
        )
    )
);

The 'montypythons' parameter is just ignored. I can imagine many people not being noticed of wrong parameters, that do not correspond to any setter. For example my layout was broken because the configuration was using the old parameter baseTemplate instead of the new layoutTemplate. In my opinion specifying a not existent parameter is like calling an inexistent setter: fatal error. Is this a design choice?

Comments

Code tags added.

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2458