Skip to content

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

@mnapoli

Description

@mnapoli

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions