Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHPORM-311 Fix Update of numeric field name #3336

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

Merged
GromNaN merged 2 commits into mongodb:5.2 from GromNaN:PHPORM-311
Apr 8, 2025
Merged

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Apr 8, 2025
edited
Loading

Fix PHPORM-311
Fix #3335 @vipinpapnai

array_merge changes the index of numeric keys, whereas array_replace keeps the keys.

Checklist

  • Add tests and ensure they pass

@GromNaN GromNaN requested a review from a team as a code owner April 8, 2025 08:00
@GromNaN GromNaN requested a review from jmikola April 8, 2025 08:00
@GromNaN GromNaN modified the milestones: 5.1, 5.2 Apr 8, 2025
// Add custom query options
if (count($this->options)) {
$options = array_merge($options, $this->options);
$options = array_replace($options, $this->options);
Copy link
Member

@jmikola jmikola Apr 8, 2025

Choose a reason for hiding this comment

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

There's likely no concern for numeric keys here, but as we discussed it's more expressive to use array_replace() when merging options as well.

GromNaN reacted with thumbs up emoji
@GromNaN GromNaN merged commit b5e2132 into mongodb:5.2 Apr 8, 2025
70 checks passed
@GromNaN GromNaN deleted the PHPORM-311 branch April 8, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jmikola jmikola jmikola approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /