Issues

ZF2-286: Cannot inject per-instance substitutions into classes implementing Aware interfaces

Issue Type: Bug Created: 2012-05-02T17:14:18.000+0000 Last Updated: 2012-10-08T20:15:19.000+0000 Status: Closed Fix version(s): Reporter: Matthew Weier O'Phinney (matthew) Assignee: Ralph Schindler (ralph) Tags: - Zend\Di

Related issues: Attachments:

Description

If you have a class implementing an Aware interface, the only way to inject setters it defines is via DI preferences. You cannot specify alternates on a per class basis, such as the following:

<pre class="highlight">
$di->configure(new Configuration(array(
    'instance' => array(
        'Foo\Bar\Baz' => array(
            'foo' => 'Foo\Bar\Foo', // where the "foo" parameter is defined in an "Aware" interface
        ),
    ),
));

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2012-05-02T17:15:38.000+0000

https://github.com/weierophinney/zf2/… demonstrates the issue.

Posted by Ralph Schindler (ralph) on 2012-10-08T20:15:19.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts