Skip to content

To make assert($mapping instanceof ManyToManyOwningSideMapping) error more explicit #11893

Open
@olinox14

Description

@olinox14

Feature Request

replacing

assert($mapping instanceof ManyToManyOwningSideMapping);

by something like :

if (!$mapping instanceof ManyToManyOwningSideMapping) {
    throw new \Exception(
        "Mapping error on field '" .
        $mapping->fieldName . '[' . $mapping->sourceEntity . ']' .
        "': joinTable can only be set on many-to-many owning side.");
}

Would ease the debugging of this error, as today, the assertion error does not provide any information about the cause of the error.

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