doctrine/DoctrineMongoDBBundle

Non-existent service after fresh installation on branch 5.0.x

michaelthieulin opened this issue · 7 comments

Environment :

  • Symfony 7.0
  • PHP 8.3 with mongodb extension

When I install a fresh version of Symfony with the symfony cli :

symfony new test --webapp --version="stable"

Then, i add the DoctrineMongoDBBundle :

composer require doctrine/mongodb-odm-bundle:5.0.x-dev

Then I answer yes for the recipe execution.

I have the following error while the execution of the @auto-scripts part of composer.json, more precisely in the cache:clear command :

The service "doctrine_mongodb.odm.command.load_data_fixtures" has a dependency on a non-existent service "doctrine_mongodb.odm.symfony.fixtures.loader".

I managed to fix this by installing doctrine/data-fixtures but I don't want to have this package in prod environment.

After accessing the page http://127.0.0.1:8000/ after launching symfony serve in the test directory, I have the following error :

The profiler template "@DoctrineMongoDB/Collector/mongodb.html.twig" for data collector "mongodb" does not exist.

Thanks and mainly thanks for the hard work.

I'm on it. Thanks for the report.

Just hit this one; $container->removeDefinition(LoadDataFixturesDoctrineODMCommand::class); should be $container->removeDefinition('doctrine_mongodb.odm.command.load_data_fixtures'); in the DoctrineMongoDBExtension.

That was my fault in #810 that I added ids based on the best practices, but forgot to search usages.

@michaelthieulin maybe you should create another issue regarding the profiler template?

Thanks for the ultra speed fix 🤣
I open another issue for the template.

I'm looking at the template issue.

Template issue fix: #833