mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Make use of DocBlock var annotation in annotation mappings #6224
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 @goatfryed on GitHub (Apr 15, 2019).
Feature Request
Use type provided by
@varannotation as fallback, if type of column or targetEntity of relation is not definedSummary
While writing my entity annotations today, I suddenly wondered: Why can't we use the DocBlock var Annotations as default value for column type definition and targetEntity of relation mappings? In a lot of cases, they just duplicate each other.
I searched for similiar feature requests, but haven't found one. Are there any notable concerns against using another annotation as a default?
Edit
Currently, the default value of Column::type is string, even though it is defined as mandatory in the documentation. So changing the behavior would be a BC Break, I guess.
@Ocramius commented on GitHub (Apr 15, 2019):
@goatfryed it would probably be more interesting to use typed properties from PHP 7.4 in
master, at this point@psfpro commented on GitHub (Apr 27, 2019):
And why YAML driver is deprecated? I don't want to write XML
@Ocramius commented on GitHub (Apr 27, 2019):
Here's a write-up on that: https://github.com/doctrine/DoctrineBundle/issues/776#issuecomment-363812362