You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
mikemix
changed the title
[Doctrine Bridge] Doctrine Extractor throws exception on custom mapping type
[Doctrine Bridge] Doctrine Extractor throws an exception with index-by over custom mapping type
Jan 31, 2020
…m and some core types (fancyweb)
This PR was merged into the 3.4 branch.
Discussion
----------
[DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #35542 and #35604
| License | MIT
| Doc PR | -
For #35604:
To guess the collection key type, the `getPhpType()` method is called. But it does not handle most objects and arrays core types. This is why an indexBy datetime does not work.
For #35542:
When the php type cannot be guessed, null is returned. In this case, we cannot pass a valid builtin type to PropertyInfo Type, so we should return null.
Commits
-------
018ec1a [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: 4.4.3
Description
I have custom Doctrine types, eg:
After upgrading to 4.4.3 the
DoctrineExtractor
throws an exception:This happens with
index-by
over custom mapping type, eg:Additional context
The text was updated successfully, but these errors were encountered: