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: Builder insert()/update() does not accept an object #6216

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jul 1, 2022

Description
Fixes #6210

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

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Jul 1, 2022
@kenjis kenjis force-pushed the fix-builder-insert-update-objects branch from 32c1ffc to 73e86f8 Compare July 1, 2022 09:20
@kenjis kenjis added the breaking change Pull requests that may break existing functionalities label Jul 1, 2022
@kenjis kenjis force-pushed the fix-builder-insert-update-objects branch from 73e86f8 to 8a63886 Compare July 2, 2022 09:14
@kenjis
Copy link
Member Author

kenjis commented Jul 2, 2022

Added changelog.

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

We've gotten very lenient with breaking changes. This is out of sync with the User Guide but is at actual risk of breaking any method extensions. I would like more of the team to sign off on this.

My opinion: extensions of the BaseBuilder should be implementing _insert() so insert() is unlikely to be extended (and could probably be final at some point). Developers extending this should be doing rather advanced work and able to cope with this change. Given these points I am in favor.

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

This is more like a bug fix that will accidentally introduce a breaking change for some rare cases, but I have no problem with that. It's not like we woke up one day and said

Hey, this method should also support objects.

The behavior was documented before and was there even in v3, so from my perspective everything is fine.

@MGatner
Copy link
Member

MGatner commented Jul 3, 2022

Thanks for the feedback all! @kenjis I think we're good unless you have more thoughts.

@kenjis kenjis merged commit ddf26e5 into codeigniter4:develop Jul 3, 2022
@kenjis kenjis deleted the fix-builder-insert-update-objects branch July 3, 2022 21:24
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Builder insert()/update() does not accept an object
4 participants