mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-4019: Proxy generator is not including PHP7 return type hints #4907
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 @doctrinebot on GitHub (Nov 25, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user radmen:
Proxy generator skips return type hints which results in generating non-compatible proxies.
Entity example:
Generated proxy:
Currently only workaround for this is to remove return type hints definitions.
@thomask commented on GitHub (Dec 22, 2015):
Didn't properly investigate, but I think the same might go for scalar type hints (doctrine/orm v2.4.8)
@Majkl578 commented on GitHub (Dec 22, 2015):
I think this is fixed by https://github.com/doctrine/common/pull/376/files, but it's unfortunately only in 2.6.0 which can't be installed with docrine/orm=2.5.*.
@BenMorel commented on GitHub (Dec 24, 2015):
This is a major issue, that affects scalar type hints as well indeed. In its current state, the ORM just cannot work with entities using scalar type hints or return types.
What prevents doctrine/common 2.6.0 from being used with doctrine/orm 2.5.* exactly?
@Ocramius commented on GitHub (Dec 24, 2015):
Time, and the lack of it.
On Dec 24, 2015 4:32 AM, "Benjamin Morel" notifications@github.com wrote:
@BenMorel commented on GitHub (Dec 24, 2015):
I mean, is it just a matter of updating the
composer.jsonfile?If I force using 2.6.0 (
"doctrine/common": "2.6.0 as 2.5.3"), it seems to work fine.I can open a PR on the ORM and DBAL packages to modify their
composer.json, but I'm not sure if there is another problem as you guys could do this modification in 2 clicks?@Ocramius commented on GitHub (Dec 24, 2015):
Yup, just a matter of doing that and preparing a new release ;-)
On Dec 24, 2015 12:13, "Benjamin Morel" notifications@github.com wrote:
@BenMorel commented on GitHub (Dec 26, 2015):
Thanks @Ocramius 👍