Skip to content

Validator entityExists function not working correctly #1365

@Antarian

Description

@Antarian

On this line Validator is checking if Entity exists if it is defined as abolute path namespace and class.

if (str_starts_with($className, '\\')) {

If condition just after this one will fail anyway, because namespace is absolute and thus it is not in array of entities returned by Doctrine, as they are not defined as absolute namespaces (without prepending slash).

I have discovered this trying to use make:crud with absolute namespaced entity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions