Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in case of a definition indexed by a number instead of a string #242

Closed
mnapoli opened this issue Apr 6, 2015 · 0 comments
Closed

Error in case of a definition indexed by a number instead of a string #242

mnapoli opened this issue Apr 6, 2015 · 0 comments
Assignees
Milestone

Comments

@mnapoli
Copy link
Member

@mnapoli mnapoli commented Apr 6, 2015

Here is a mistake that can be made easily:

return array(
    DI\object('Foo\Bar')
        ->constructor(/* ... */),
);

Here the entry is not indexed by the class name.

PHP-DI should throw an exception to avoid silent errors of missing definitions.

@mnapoli mnapoli added the enhancement label Apr 6, 2015
@mnapoli mnapoli added this to the 5.0 milestone Apr 6, 2015
@mnapoli mnapoli modified the milestone: 5.0 Apr 19, 2015
@mnapoli mnapoli added the easy-pick label Mar 15, 2016
mnapoli added a commit that referenced this issue Mar 22, 2017
@mnapoli mnapoli self-assigned this Mar 22, 2017
@mnapoli mnapoli added this to the 6.0 milestone Mar 22, 2017
mnapoli added a commit that referenced this issue Mar 22, 2017
Fix #242 Error in case a definition is not indexed by a string
@mnapoli mnapoli closed this Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant