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

Create Carbon object from $model->paid_date during database migration #871

Merged
merged 1 commit into from
May 20, 2023

Conversation

ajcsilva
Copy link
Contributor

This PR fixes an issue when running php please sc:migrate-order-statuses when upgrading from 4.x to 5.x.

$model->paid_date was not augmented into a Carbon object before calling the format method.

Copy link
Owner

@duncanmcclean duncanmcclean left a comment

Choose a reason for hiding this comment

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

Thanks!

I assumed it was being cast to a Carbon instance by Eloquent but just realised I never actually added paid_at to the $casts array on the model.

@duncanmcclean duncanmcclean merged commit 04c5797 into duncanmcclean:5.x May 20, 2023
2 checks passed
@github-actions
Copy link

Released as part of v5.0.3.

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.

None yet

2 participants