Cache problem with php 7.1 nullable types #5385

Closed
opened 2026-01-22 15:06:03 +01:00 by admin · 6 comments
Owner

Originally created by @Kearny on GitHub (Jan 15, 2017).

Originally assigned to: @Ocramius on GitHub.

Doctrine cache generator doesn't report the nullable option : check the following print screen :

pasted_image_at_2017_01_15_10_45_pm

public function getPhone(): ?string

become

public function getPhone(): string

which is a problem.

Thanks for taking care of that, and thanks for the great job done with doctrine !

Originally created by @Kearny on GitHub (Jan 15, 2017). Originally assigned to: @Ocramius on GitHub. Doctrine cache generator doesn't report the nullable option : check the following print screen : ![pasted_image_at_2017_01_15_10_45_pm](https://cloud.githubusercontent.com/assets/5919114/21966506/f745f044-db74-11e6-8186-f9049d0ee0be.png) `public function getPhone(): ?string` become `public function getPhone(): string` which is a problem. Thanks for taking care of that, and thanks for the great job done with doctrine !
admin added the BugInvalid labels 2026-01-22 15:06:03 +01:00
admin closed this issue 2026-01-22 15:06:03 +01:00
Author
Owner

@Ocramius commented on GitHub (Jan 15, 2017):

Make sure that you re-generate the proxies once you upgraded to doctrine/common 2.7.*. This was already fixed ;-)

@Ocramius commented on GitHub (Jan 15, 2017): Make sure that you re-generate the proxies once you upgraded to `doctrine/common` `2.7.*`. This was already fixed ;-)
Author
Owner

@Kearny commented on GitHub (Jan 15, 2017):

Hey, thanks for the answer. I use doctrine with symfony but I can't see a doctrine/common in my composer.json. Is it this that I should change ?

"doctrine/orm" : "^2.5"

@Kearny commented on GitHub (Jan 15, 2017): Hey, thanks for the answer. I use doctrine with symfony but I can't see a doctrine/common in my composer.json. Is it this that I should change ? `"doctrine/orm" : "^2.5"`
Author
Owner

@Ocramius commented on GitHub (Jan 15, 2017):

Just run a composer update and check your composer.lock for the installed doctrine/common version.

@Ocramius commented on GitHub (Jan 15, 2017): Just run a `composer update` and check your `composer.lock` for the installed `doctrine/common` version.
Author
Owner

@Kearny commented on GitHub (Jan 15, 2017):

I don't have anything updated for now, based on composer.lock I stick with "version": "v2.6.2".

I guess I just should wait.

@Kearny commented on GitHub (Jan 15, 2017): I don't have anything updated for now, based on composer.lock I stick with "version": "v2.6.2". I guess I just should wait.
Author
Owner

@Ocramius commented on GitHub (Jan 15, 2017):

Please do check the version you have installed, before reporting an issue ;-)

@Ocramius commented on GitHub (Jan 15, 2017): Please do check the version you have installed, before reporting an issue ;-)
Author
Owner

@Kearny commented on GitHub (Jan 15, 2017):

Yes sorry.

@Kearny commented on GitHub (Jan 15, 2017): Yes sorry.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5385