Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Vardocs for PDO values: int or string? #946

Open
colinmollenhour opened this issue May 4, 2020 · 2 comments
Open

Discussion: Vardocs for PDO values: int or string? #946

colinmollenhour opened this issue May 4, 2020 · 2 comments
Labels
Cleanup: DOC blocks Related to DOC block updates and fixes. waiting for feedback

Comments

@colinmollenhour
Copy link
Member

This is a continuation from a discussion about how to properly vardoc values that in the database are stored as ints, but because of PDO all values when queried from the database are returned as strings.

#693 (comment)

@colinmollenhour colinmollenhour added Cleanup: DOC blocks Related to DOC block updates and fixes. waiting for feedback labels May 4, 2020
@colinmollenhour colinmollenhour changed the title Vardoc discussion for PDO values: int or string? Discussion: Vardocs for PDO values: int or string? May 4, 2020
@sreichel
Copy link
Contributor

sreichel commented May 6, 2020

In a few words ... if the method is named get "someId" I'd expect an int ...

I just can't understand how something like this wouldn't get noticed by anyone: magento/magento2#18079

At the end ... if stored as int, but returned as string, it should be (re-)casted to int.

@tmotyl
Copy link
Contributor

tmotyl commented May 6, 2020

I believe it could be fixed on the db driver level, but I would not do the change in 1.9 branch but rather 20.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup: DOC blocks Related to DOC block updates and fixes. waiting for feedback
Projects
None yet
Development

No branches or pull requests

3 participants