Skip to content

[PropertyInfo] DoctrineExtractor - There is bug when indexBy is meta key id #25834

Closed
@insekticid

Description

@insekticid

There is bug when indexBy is meta key id introduced in doctrine pull
doctrine/orm#639
originally from issue
doctrine/orm#3094
doctrine/orm#1784

Buggy line is

$typeOfField = $subMetadata->getTypeOfField($indexProperty);

where $typeOfField = $subMetadata->getTypeOfField($indexProperty); returns null
-> $collectionKeyType = $this->getPhpType($typeOfField); returns null
-> return array(new Type(null) throws throw new \InvalidArgumentException(sprintf('"" is not a valid PHP type.', $builtinType));

I discoverred this bug when I attached Api Platform ApiLoader
https://github.com/api-platform/core/blob/master/src/Bridge/Symfony/Routing/ApiLoader.php#L108

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