Skip to content

PHPC-1514 Remove php_phongo_read_concern_to_zval#1989

Merged
paulinevos merged 1 commit intomongodb:v2.xfrom
paulinevos:rm_rc_to_zval
Apr 17, 2026
Merged

PHPC-1514 Remove php_phongo_read_concern_to_zval#1989
paulinevos merged 1 commit intomongodb:v2.xfrom
paulinevos:rm_rc_to_zval

Conversation

@paulinevos
Copy link
Copy Markdown
Contributor

@paulinevos paulinevos commented Apr 16, 2026

Fix PHPC-1514
It's only used by the Query debug handler and can be replaced by adding a ReadConcern object to Query's debug info instead

@paulinevos paulinevos requested a review from a team as a code owner April 16, 2026 11:05
@paulinevos paulinevos requested review from GromNaN and Copilot and removed request for a team April 16, 2026 11:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the internal phongo_read_concern_to_zval helper by switching MongoDB\Driver\Query’s debug handler to expose a MongoDB\Driver\ReadConcern object directly in debug info.

Changes:

  • Remove phongo_read_concern_to_zval declaration and implementation.
  • Update Query debug info to use phongo_readconcern_init() and attach a ReadConcern object instead of an array.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/MongoDB/ReadConcern.h Drops the removed helper’s declaration.
src/MongoDB/ReadConcern.c Drops the removed helper’s implementation.
src/MongoDB/Query.c Uses phongo_readconcern_init() for readConcern debug info.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/MongoDB/Query.c
@GromNaN
Copy link
Copy Markdown
Member

GromNaN commented Apr 16, 2026

I'm surprised that a test like tests/query/query-debug-001.phpt doesn't fail. The format has changed from an array to an instance of ReadConcern.

@GromNaN GromNaN changed the title Remove php_phongo_read_concern_to_zval PHPC-1514 Remove php_phongo_read_concern_to_zval Apr 16, 2026
@paulinevos
Copy link
Copy Markdown
Contributor Author

@GromNaN I'm actually surprised the test isn't included in the PR, cause I did update it and I'm using JJ (which should include any unstaged changes with the revision). Weird

Copilot AI review requested due to automatic review settings April 17, 2026 13:30
It's only used by the `Query` debug handler and can be replaced by
adding a `ReadConcern` object to `Query`'s debug info instead
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@paulinevos paulinevos enabled auto-merge April 17, 2026 13:48
@paulinevos paulinevos merged commit b1a6bcf into mongodb:v2.x Apr 17, 2026
43 checks passed
@paulinevos paulinevos deleted the rm_rc_to_zval branch April 17, 2026 13:52
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.

3 participants