MongoDB Bundle configuration is not added automatically when I run composer require symfony/mongodb-odm

24 views Asked by At

I want to make an API project in symfony using mongodb, so I want to install doctrine mongodb bundle to manage the data easier.

Actually, i have no problems installing the bundles, but after installing them absolutely nothing is configured. I just started learning PHP one month ago so I got no idea how to configure it manually the bundles.php file, the packages folder, and create a file for the connection.

I am using PHP8.2.11

I just ran symfony new veterinary-backend and had no problems I run composer require doctrine/mongodb-odm and had no problems

When I look into my composer.json file, there is not problem:

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.2",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "doctrine/mongodb-odm": "^2.6",
        "doctrine/mongodb-odm-bundle": "^2.0",
        "mongodb/mongodb": "^1.17",
        "symfony/console": "7.0.*",
        "symfony/dotenv": "7.0.*",
        "symfony/flex": "^2",
        "symfony/framework-bundle": "7.0.*",
        "symfony/runtime": "7.0.*",
        "symfony/yaml": "7.0.*"
    },

But nothing is being configured in bundles.php:

return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
];

I have also tried to run composer require doctrine/mongodb-odm-bundle and composer require mongodb/mongodb. In any of them I had problems installing them since I downloaded the extensions needed for PHP.

0

There are 0 answers