Skip to content

Misleading Exceptionmessage when using the object definition helper with a non existing class #388

@mopahle

Description

@mopahle

\DI\object(NonExistingClass::class)->constructorParameter('foo', 'bar)
gives the exception message "Parameter with name 'foo' could not be found".
The real cause of the exception ("Class NonExistingClass does not exist") is dropped in ObjectDefinitionHelper::fixParamter() when catching the ReflectionException.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions