PHPC-2695 Replace deprecated bson_append_array_begin with bson_append_array_unsafe_begin#1996
Conversation
…_array_unsafe_begin
There was a problem hiding this comment.
Pull request overview
Updates the extension and CI/build metadata to support libmongoc 2.3.0 by replacing a deprecated libbson API usage, while also bumping tracked libmongoc/libmongocrypt versions and adding a regression test around cursor cleanup behavior.
Changes:
- Replace deprecated
bson_append_array_begincalls withbson_append_array_unsafe_beginin BSON encoding. - Bump referenced dependency versions (mongo-c-driver 2.3.0, libmongocrypt 1.17.3) across build configs, CI, and SBOM.
- Add a new PHPT regression test ensuring
killCursorsis issued after a connection error duringgetMore.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cursor/bug2660-001.phpt | Adds a regression test asserting killCursors is sent after a getMore connection failure. |
| src/phongo_bson_encode.c | Switches to bson_append_array_unsafe_begin to avoid deprecated API usage. |
| src/LIBMONGOCRYPT_VERSION_CURRENT | Updates tracked libmongocrypt version to 1.17.3. |
| scripts/update-sbom.sh | Adjusts docker invocation used to regenerate the SBOM. |
| sbom.json | Updates SBOM component versions/refs for libmongocrypt and mongo-c-driver. |
| config.w32 | Updates bundled libmongoc source list for Windows builds consistent with newer libmongoc. |
| config.m4 | Raises minimum system library versions and improves configure-time error messages. |
| .github/workflows/tests.yml | Updates system-libs CI job to use libmongoc 2.3.0 and libmongocrypt 1.17.3; fixes env context usage. |
| .github/actions/linux/build-libmongocrypt/action.yml | Switches apt repo usage and pins libmongocrypt-dev to the requested patch version. |
| .evergreen/config/templates/build/build-libmongoc.yml | Updates Evergreen build variables to libmongoc 2.3.0 / r2.3. |
| .evergreen/config/generated/build/build-libmongoc.yml | Regenerates Evergreen config with updated libmongoc version variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alcaeus
left a comment
There was a problem hiding this comment.
LGTM. Interesting this is now marked as "unsafe" -- I wonder what the safe alternative to this would be.
|
Good question:
|
Replace the deprecated
bson_append_array_beginwithbson_append_array_unsafe_begin, the non-deprecated equivalent introduced in libmongoc 2.3.0.Fix PHPC-2695