You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #52336 [HttpFoundation][Lock] Makes MongoDB adapters usable with ext-mongodb only (GromNaN)
This PR was squashed before being merged into the 6.4 branch.
Discussion
----------
[HttpFoundation][Lock] Makes MongoDB adapters usable with `ext-mongodb` only
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | -
| License | MIT
[`mongodb/mongodb`](https://packagist.org/packages/mongodb/mongodb) is complex to handle for libraries with optional support of MongoDB, as it requires `ext-mongodb`. In order to reduce complexity for maintainers, I reimplemented the session and lock adapters to use only the C driver classes.
Some features of `MongoDB\Client` are missing (server selection, session, transaction). But they are not necessary to store Sessions and Lock.
Changes:
- Lock & Session accept a `MongoDB\Driver\Manager`
- The lock uses exclusively UTC date. Before, there was a mix of `time()` and `UTCDatetime` objects.
- Session tests require a mongo server.
- `mongodb/mongodb` not needed in the CI
And of course also allows developers to use this adapters without installing `mongodb/mongodb` if they want, with the same features as before.
Commits
-------
bc24cb3 [HttpFoundation][Lock] Makes MongoDB adapters usable with `ext-mongodb` only
0 commit comments