mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
BC : Type-hint of annotation construct of Doctrine\ORM\MappingManyToOne #6768
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ohaag on GitHub (Jun 24, 2021).
Hello,
Isn't there a Breaking change introduced with this MR which have been missed ?
The highlighted line type-hint the cascade annotation into an array.
But it was previously possible to write
cascade="all".Now, it generated this error :
Argument 2 passed to Doctrine\ORM\Mapping\ManyToOne::__construct() must be of the type array or null, string given, called in /Users/ohaag/workspace/mist/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 971Only
cascade={"all"}works.This should be noticed in upgrade documentation.
N.B : it could have further impact as the construct have been added for many Class in the same time. I only tested the cascade issue.