Skip to content

PHPLIB-1627: BulkWriteCommand API #1630

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
merged 38 commits into from
May 12, 2025
Merged

PHPLIB-1627: BulkWriteCommand API #1630

merged 38 commits into from
May 12, 2025

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Mar 4, 2025

@jmikola jmikola force-pushed the 2.x-bulkwrite branch 4 times, most recently from d9351cc to 33952f7 Compare March 24, 2025 15:50
@jmikola jmikola force-pushed the 2.x-bulkwrite branch 3 times, most recently from f2cae41 to c4c0deb Compare April 1, 2025 20:07
@GromNaN GromNaN marked this pull request as ready for review May 9, 2025 11:38
@GromNaN GromNaN requested a review from a team as a code owner May 9, 2025 11:38
@GromNaN GromNaN self-requested a review May 9, 2025 11:38
@GromNaN
Copy link
Member

GromNaN commented May 12, 2025

The spec tests need to be updated with mongodb/specifications@63e382e

@alcaeus
Copy link
Member

alcaeus commented May 12, 2025

The spec tests need to be updated with mongodb/specifications@63e382e

The previous failure was unrelated, but I'll update the spec tests once mongodb/mongo-php-driver#1822 is merged up to v2.x.

@alcaeus alcaeus requested a review from Copilot May 12, 2025 11:52
Copy link
Contributor

@Copilot 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

This PR implements the new BulkWriteCommand API and refactors several test and client modules to align with the updated driver options and error messaging. Key changes include:

  • Removing redundant test helper methods and refactoring driver option handling.
  • Introducing new stub files and operation classes for BulkWriteCommand support.
  • Updating tests to reflect newly designed error messages and encoder/codec accessors.

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/SpecTests/ClientSideEncryption/FunctionalTestCase.php Removed redundant createTestClient method to use inherited behavior.
tests/PedantryTest.php Updated method filtering to re-index arrays and exclude non-public constructors.
tests/FunctionalTestCase.php Refactored driver option handling with renamed method appendDriverOptions.
tests/Collection/CollectionFunctionalTest.php Added tests for getBuilderEncoder and getCodec, and updated expected exception messages.
stubs/Driver/*.stub.php Added stub files for new BulkWriteCommand API components.
src/Operation/ClientBulkWriteCommand.php Introduced new operation for executing bulk write commands with updated options handling.
src/ClientBulkWrite.php Implemented a fluent API for bulk write operations with proper option validations.
src/Client.php Added bulkWrite method integrating the new BulkWriteCommand API.
Configuration files and workflows Updated dependency versions and driver version settings with TODO notes.

@@ -12,7 +12,9 @@ on:
- "feature/*"

env:
DRIVER_VERSION: "stable"
# TODO: change to "stable" once 2.0.0 is released
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# TODO: change to "stable" once 2.0.0 is released
# TODO: change to "stable" once 2.1.0 is released

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

LGTM. Great work @jmikola

@alcaeus alcaeus merged commit 37bbdd5 into mongodb:v2.x May 12, 2025
31 checks passed
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