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
Type hints to be generated on methods which have a scalar type set
Actual behaviour
No type hints generated on methods
Steps to reproduce the behaviour
Create a mapping configuration
Generate entities
Hi all, I've recently started to use the ORM package and can see there's logic for creating type hints on methods whilst generating entities via the artisan command (EntityGenerator.php, line 1383).
The above code seems to stop the entities generating as $types[$typeHint] is set, I've tested this using the following dd (dd($typeHint, isset($types[$typeHint]), $types);) which produces:
The package is acting as the logic expects, but I'm wondering if there's something else I need to do to get type hints on my entities, or a reason I wouldn't want them?
Thanks
The text was updated successfully, but these errors were encountered:
@dblencowe I think you should address this question to original doctrine devs here https://github.com/doctrine/orm since this package does not control the code of EntityGenerator.php
Also I need to mention that entity generation is deprecated and will be removed from v3.0 of doctrine
Package version, Laravel version
v2.6.3
Expected behaviour
Type hints to be generated on methods which have a scalar type set
Actual behaviour
No type hints generated on methods
Steps to reproduce the behaviour
Hi all, I've recently started to use the ORM package and can see there's logic for creating type hints on methods whilst generating entities via the artisan command (EntityGenerator.php, line 1383).
The above code seems to stop the entities generating as $types[$typeHint] is set, I've tested this using the following dd (
dd($typeHint, isset($types[$typeHint]), $types);
) which produces:The package is acting as the logic expects, but I'm wondering if there's something else I need to do to get type hints on my entities, or a reason I wouldn't want them?
Thanks
The text was updated successfully, but these errors were encountered: