Skip to content

Conversation

@jmikola
Copy link
Contributor

@jmikola jmikola commented Oct 15, 2025

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).

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.
@jmikola
Copy link
Contributor Author

jmikola commented Oct 23, 2025

@GromNaN: all of the CI failures here seem unrelated. Can you confirm?

Copy link
Owner

@Seldaek Seldaek left a 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?

@Seldaek Seldaek merged commit 1297c44 into Seldaek:main Oct 23, 2025
4 of 13 checks passed
@Seldaek
Copy link
Owner

Seldaek commented Oct 23, 2025

Well, merging, thanks!

@jmikola
Copy link
Contributor Author

jmikola commented Oct 23, 2025

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.

@jmikola jmikola deleted the phporm-398 branch October 23, 2025 18:49
Seldaek pushed a commit that referenced this pull request Oct 23, 2025
* 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
@Seldaek
Copy link
Owner

Seldaek commented Oct 23, 2025

Backported in 2.x here 2dc620c too

@Seldaek
Copy link
Owner

Seldaek commented Oct 23, 2025

That was quick.

I almost hit merge but as I reviewed you force pushed.. that was close :D

@jmikola
Copy link
Contributor Author

jmikola commented Oct 24, 2025

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