When booting my vm today, the pecl mongo package 1.2.11 got installed. And it breaks doctrine/mongodb. The error message reads as followed:
Function MongoCollection::setSlaveOkay() is deprecated
As for a solution, Jeremy suggest to set error reporting to not include deprecated messages. This might work for some. People developing symfony2 applications are having a harder time since the kernel sets error_reporting to -1 when in debug mode.
If you are facing this particular error, you should check if error_reporting is excluding deprecated:
error_reporting = E_ALL & ~E_DEPRECATED
To run your symfony2 applications again, you got two options (I came up so far):
- Remove the debug mode from dev and test environment
- Remove the
error_reporting(-1);from the bootstrap.php.cache and you are good to go if you don't rerun bin/vendors install (or php composer.phar install, if you are using composer).