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

fix: Entity::toRawArray() may return Time object #9286

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ping-yee
Copy link
Contributor

Description
Fix #8302

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@neznaika0
Copy link
Contributor

Dangerous change. If we want to store the Time object using DataCaster in the Model, the returned array toRawArray() will be false.
https://codeigniter4.github.io/userguide/models/model.html#model-field-casting

@michalsn michalsn added bug Verified issues on the current code behavior or pull requests that will fix them breaking change Pull requests that may break existing functionalities labels Nov 18, 2024
@michalsn
Copy link
Member

Well, this will be problematic. We certainly can't accept it in the develop branch.

@ping-yee
Copy link
Contributor Author

@neznaika0 Yuh, you're right.

I miss that and I will change the better way to fix that issue.

Can I keep this PR to discuss and work on it?

@michalsn
Copy link
Member

Can I keep this PR to discuss and work on it?

Sure.

@michalsn michalsn added the needs rework Changes requested by reviewer that are still pending label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them needs rework Changes requested by reviewer that are still pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Entity::toRawArray() may return Time object
3 participants