Issues

ZF2-576: AbstractPluginManager and creationOptions

Description

Hi, I have a problem with the transfer options when using a custom filter or validator.


$config = array(
    'factories' => array(
        'myFilter' => function ($serviceLocator) {
            $instance = new MyFilter();
            // ... some init code
            return $instance;
        }
    )
);

$filterPlugin = new \Zend\Filter\FilterPluginManager(
    new \Zend\ServiceManager\Config($config)
);

$filterOptions = array(
    // some options
);

$filterPlugin->get('myFilter', $filterOptions);

//I expect must be called myFilter->setOptions($filterOptions)

The fact that $filterOptions transferred only in invokable classes, but what about the rest?

Comments

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/2601