Skip to content

Merge v2.5 into v2.x - #2202

Merged
mongodb-drivers-pr-bot[bot] merged 3 commits into
v2.xfrom
merge-v2.5-into-v2.x-1793359444850
Oct 30, 2026
Merged

mongodb-drivers-pr-bot[bot] merged 3 commits into
v2.xfrom
merge-v2.5-into-v2.x-1793359444850

Conversation

@mongodb-drivers-pr-bot

Copy link
Copy Markdown
Contributor

Merge new changes from v2.5 into v2.x.

Commits

Resolving conflicts

To resolve any conflicts, check out the temporary branch and run the following command:
git merge v2.x -m "Resolve conflicts in v2.x"

Ignoring changes

To ignore from the remote branch, first reset the temporary branch to v2.x and manually merge using the `ours` merge strategy:
git reset --hard v2.x
git merge --strategy=ours v2.5 -m "Ignore changes from v2.5"

Then, push the temporary branch to update the pull request.

* PHPC-2797: Shut down libmongoc when the process exits

libmongoc keeps process-wide state that is initialized by mongoc_init() and
released by mongoc_cleanup(). Both calls are guarded by bson_once, and the C
driver documents that mongoc_init() does not reinitialize the driver after
mongoc_cleanup().

The driver called mongoc_cleanup() from the last GSHUTDOWN, assuming that the
last engine shutdown means the end of the process. This does not hold for SAPIs
that stop and start the engine in the same process, such as FrankenPHP
rebooting its threads on opcache_reset(). The next engine startup reuses a
libmongoc instance whose handshake data was freed, and the next Manager
creation aborts in mongoc_handshake_data_append().

Initialize libmongoc once per process in MINIT and shut it down with atexit(),
together with the libbson vtable restoration. GSHUTDOWN and GINIT now only deal
with per-thread state, so the thread counter is removed.

* PHPC-2797: Harden the FrankenPHP restart test

Run a command on a MongoDB server on every request, so the test checks that
the connection works after the in-process thread reboot.

Use a single worker, so a different instance identifier can only come from a
restart of that worker, and reject an empty response after the reboot instead
of treating it as a new instance.

Cache the Docker layers in the CI workflow with the GitHub Actions cache.

* PHPC-2797: Run the FrankenPHP test against an Atlas Local replica set

Use mongodb/mongodb-atlas-local, which starts a single-node replica set and
ships a healthcheck. Wait for that healthcheck before checking the worker.

* PHPC-2797: Run Atlas Local as a GitHub Actions service

Declare mongodb/mongodb-atlas-local as a service container in the FrankenPHP
workflow. The runner waits for its built-in healthcheck before running the
steps. The test script uses MONGODB_URI when it is set and keeps starting the
container itself for local runs. The FrankenPHP container reaches the service
through the Docker host.

* PHPC-2797: Require MONGODB_URI in the FrankenPHP test

The test script no longer starts a MongoDB server. The developer or the CI
service provides one and passes MONGODB_URI.
@mongodb-drivers-pr-bot
mongodb-drivers-pr-bot Bot requested a review from a team as a code owner October 30, 2026 11:24
@mongodb-drivers-pr-bot
mongodb-drivers-pr-bot Bot removed the request for review from a team October 30, 2026 11:24
Comment thread .github/workflows/frankenphp.yml Fixed
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@GromNaN GromNaN mentioned this pull request Oct 30, 2026
@mongodb-drivers-pr-bot
mongodb-drivers-pr-bot Bot merged commit 2b6bfc9 into v2.x Oct 30, 2026
51 checks passed
@mongodb-drivers-pr-bot
mongodb-drivers-pr-bot Bot deleted the merge-v2.5-into-v2.x-1793359444850 branch October 30, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants