doctrine / DoctrineMongoDBBundle

Integrates Doctrine MongoDB ODM with Symfony
http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html
MIT License
377 stars 229 forks source link

Fix type deprecations in command loggers #750

Closed IonBazan closed 1 year ago

IonBazan commented 1 year ago

CommandLoggers are now fully typed (see https://github.com/mongodb/mongo-php-driver/releases/tag/1.15.0).

Fixes following issue:

Return type of Doctrine\Bundle\MongoDBBundle\APM\StopwatchCommandLogger::commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) should either be compatible with MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Ref: https://github.com/doctrine/mongodb-odm/pull/2485

bitgandtter commented 1 year ago

when is this going to be released? I'm having some long console outputs about this warning

malarzm commented 1 year ago

@bitgandtter here you go ;)

bitgandtter commented 1 year ago

@malarzm can we get a new release of https://github.com/doctrine/mongodb-odm the https://github.com/doctrine/mongodb-odm/blob/2.4.x/lib/Doctrine/ODM/MongoDB/APM/CommandLogger.php have the new method contract but it's not on the latest release, causing same warnings as above. It would be great If you guys can release a patch for it

malarzm commented 1 year ago

Sure :) https://github.com/doctrine/mongodb-odm/releases/tag/2.4.3