Skip to content

[Doctrine Bridge] Doctrine Extractor throws an exception with index-by over custom mapping type #35542

Closed
@mikemix

Description

@mikemix

Symfony version(s) affected: 4.4.3

Description
I have custom Doctrine types, eg:

doctrine:
  dbal:
    types:
      users_user_id: Base\Infrastructure\Doctrine\Type\UsersUserId

After upgrading to 4.4.3 the DoctrineExtractor throws an exception:

Argument 1 passed to Symfony\Component\PropertyInfo\Type::__construct() must be of the type string, null given, called in /var/www/html/vendor/symfony/doctrine-bridge/PropertyInfo/DoctrineExtractor.php on line 126

This happens with index-by over custom mapping type, eg:

<many-to-many field="managers" target-entity="Base\Users\Domain\Model\User" index-by="id" />

Additional context

obraz

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