Skip to content

Throw an exception if a class name has a leading \ #243

@mnapoli

Description

@mnapoli

When a class name is prefixed with \ PHP-DI doesn't show any warning:

return array(
    '\Foo\Bar' => DI\object(),
);

This will not work as FQN must not contain a leading \. PHP-DI should throw an exception.

Related to #242, might need a "validation pass"? Enabled only for dev environment?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions