-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Replace deprecated code in MongoDB classes and allow 2.0+ #1998
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
Conversation
Monolog already required mongodb/mongodb 1.8+ (and a related ext-mongodb version) so this code path was never used.
The original selectCollection method is deprecated. Since Monolog itself requires PHP 8.1, it should be sane to rely on 1.21+, which shares the same requirement.
|
@GromNaN: all of the CI failures here seem unrelated. Can you confirm? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.. @jmikola is it ready to go from your end too?
|
Well, merging, thanks! |
|
That was quick. Yup, @GromNaN reviewed earlier and I just followed up to address his feedback. symfony/monolog-bundle#550 is next, but I think he can take care of merging that. |
* Remove unused code path in MongoDBFormatter Monolog already required mongodb/mongodb 1.8+ (and a related ext-mongodb version) so this code path was never used. * Use Collection::getCollection() from mongodb/mongodb 1.21 The original selectCollection method is deprecated. Since Monolog itself requires PHP 8.1, it should be sane to rely on 1.21+, which shares the same requirement. * Update class refs for MongoDB extension and library * Conditionally use Collection getter by version * Relax PHPLIB version requirement * Use RequiresPhpExtension attribute to require ext-mongodb * Import UTCDateTime class and revise var names
|
Backported in 2.x here 2dc620c too |
I almost hit merge but as I reviewed you force pushed.. that was close :D |

https://jira.mongodb.org/browse/PHPORM-398
This removes some deprecated code related to the MongoDB extension and library. Since Monolog requires PHP 8.1, I'm assuming it's kosher to also rely on mongodb/mongodb 1.21+ (same platform requirement).