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

Remove deprecations using Symfony 6.4 #789

Closed franmomu closed 8 months ago

franmomu commented 10 months ago

Because of https://github.com/symfony/symfony/pull/50391 there are these deprecations:

1x: The "Doctrine\Bundle\MongoDBBundle\CacheWarmer\HydratorCacheWarmer::warmUp()" method will require a new "string|null $buildDir" argument in the next major version of its interface "Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface", not defining it is deprecated.
    1x in HydratorCacheWarmerTest::setUp from Doctrine\Bundle\MongoDBBundle\Tests\CacheWarmer

  1x: The "Doctrine\Bundle\MongoDBBundle\CacheWarmer\PersistentCollectionCacheWarmer::warmUp()" method will require a new "string|null $buildDir" argument in the next major version of its interface "Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface", not defining it is deprecated.
    1x in PersistentCollectionCacheWarmerTest::setUp from Doctrine\Bundle\MongoDBBundle\Tests\CacheWarmer

  1x: The "Doctrine\Bundle\MongoDBBundle\CacheWarmer\ProxyCacheWarmer::warmUp()" method will require a new "string|null $buildDir" argument in the next major version of its interface "Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface", not defining it is deprecated.
    1x in ProxyCacheWarmerTest::setUp from Doctrine\Bundle\MongoDBBundle\Tests\CacheWarmer

I've created a second commit to silence these ones, but the changes are not BC, so we have to decide if we are fine with that or we should ignore it for now.

There are some other deprecations that we have to take a look.

franmomu commented 8 months ago

The BC break changes are mandatory if we want to have compatibility with Symfony 7, that's why I targeted 4.7.x, this PR would resolve some of the issues in https://github.com/doctrine/DoctrineMongoDBBundle/pull/784

GromNaN commented 8 months ago

Thank you very much @franmomu