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

Decimal columns as string in Models #948

Merged
merged 2 commits into from
Jun 9, 2020
Merged

Conversation

fgibaux
Copy link
Contributor

@fgibaux fgibaux commented Jun 8, 2020

To follow Eloquent casts

Closes #417

To follow Eloquent casts
Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems "legit" to me; I personally can only test with Postgres and the decimal type via default PDO settings indeed is returned as string => even without a custom casts.

Can you please fix the failed tests due to the change?

@fgibaux
Copy link
Contributor Author

fgibaux commented Jun 9, 2020

oops fogot the tests, should be ok now.

on MySQL with default Laravel/PDO settings it's also a string by default.

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this is good @barryvdh :)

@barryvdh
Copy link
Owner

barryvdh commented Jun 9, 2020

Lol I made it a string myself in Laravel :P

@barryvdh barryvdh merged commit d35ea6e into barryvdh:master Jun 9, 2020
@mfn
Copy link
Collaborator

mfn commented Jun 10, 2020

lol, indeed!

For the curious: laravel/framework#26173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decimal columns as float
3 participants