Mongodb-odm: Configuration::setLoggerCallable removed without mentioning in UPGRADE notes.

Created on 15 Feb 2019  路  4Comments  路  Source: doctrine/mongodb-odm

I consulted these materials before posting this:

https://github.com/doctrine/mongodb-odm/blob/master/UPGRADE-2.0.md
https://github.com/doctrine/mongodb-odm/blob/master/CHANGELOG-2.0.md
https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/2.0/reference/logging.html

BC Break Report

| Q | A
|------------ | ------
| BC Break | yes
| Version | 2.0.0-beta1

Summary

Doctrine\ODM\MongoDB\Configuration::setLoggerCallable is no longer available and it is not clear how to replace it. There is no mention in UPGRADE notes or CHANGELOG and documentation does not exist.

Most helpful comment

Thanks for reporting this! We've noticed a couple of other BC breaks as well, which means that we'll need to do another pass to make sure we document all deprecations and removals.

I played around with roave/backward-compatibility-check this morning and will try to use that to figure out what else we missed.

All 4 comments

Thanks for reporting this! We've noticed a couple of other BC breaks as well, which means that we'll need to do another pass to make sure we document all deprecations and removals.

I played around with roave/backward-compatibility-check this morning and will try to use that to figure out what else we missed.

Closing in favour of #2009 where I finally got to running roave/backward-compatibility-check.

whats the preferred approach now for logging?

The APM features of the MongoDB driver should be used to log commands that are run. The Symfony bundle for MongoDB ODM already incorporates this into the Symfony profiler. If not using Symfony, you can use the Doctrine\ODM\MongoDB\APM\CommandLogger class and base your logic on that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rieschl picture rieschl  路  4Comments

lsv picture lsv  路  5Comments

caiquecastro picture caiquecastro  路  9Comments

douglasjam picture douglasjam  路  6Comments

manuelbcd picture manuelbcd  路  5Comments