Home > Mobile >  Symfony/ possibly Doctrine error on any attempts of calling make:entity
Symfony/ possibly Doctrine error on any attempts of calling make:entity

Time:05-19

On any attempts to call "php bin/console make:entity" I get the following error:

In DoctrineHelper.php line 180:

Class "Doctrine\Persistence\Mapping\Driver\AnnotationDriver" does not exist

I checked vendor, and it appears there is no file called AnnotationDriver.php there but I'm unsure on how to proceed.

using the following:

  "type": "project",
"license": "proprietary",
"require": {
    "php": ">=7.1.3",
    "ext-ctype": "*",
    "ext-iconv": "*",
    "curl/curl": "^2.3",
    "doctrine/annotations": "^1.13",
    "doctrine/doctrine-bundle": "^2.6",
    "doctrine/doctrine-migrations-bundle": "^3.2",
    "doctrine/orm": "^2.11",
    "easycorp/easyadmin-bundle": "*",
    "friendsofsymfony/rest-bundle": "^3.3",
    "guzzlehttp/guzzle": "^7.4",
    "lcobucci/jwt": "*",
    "nelmio/cors-bundle": "^2.2",
    "phpdocumentor/reflection-docblock": "^5.3",
    "sensio/framework-extra-bundle": "^6.2",
    "symfony/asset": "*",
    "symfony/console": "4.4.*",
    "symfony/dotenv": "4.4.*",
    "symfony/expression-language": "4.4.*",
    "symfony/flex": "^1.3.1",
    "symfony/form": "4.4.*",
    "symfony/framework-bundle": "4.4.*",
    "symfony/http-foundation": "4.4.*",
    "symfony/monolog-bundle": "^3.7",
    "symfony/property-access": "4.4.*",
    "symfony/property-info": "4.4.*",
    "symfony/proxy-manager-bridge": "4.4.*",
    "symfony/security-bundle": "4.4.*",
    "symfony/serializer": "4.4.*",
    "symfony/twig-bundle": "4.4.*",
    "symfony/validator": "4.4.*",
    "symfony/yaml": "4.4.*"
}

in my composer.json. I tried upgrading and downgrading doctrine/orm but it didn't help.

CodePudding user response:

I think you are the same person I just answered on symfony github discussion.

Here is my answer:

So I checked online for a similar issue and I found this.

You need to change your composer.json and downgrade your doctrine/orm to 2.11 until you migrate to symfony 5.4 because symfony 4.4 support has been dropped.

So modify your composer.json with:

"doctrine/orm": "^2.11",

And also:

"conflict": {
        "symfony/symfony": "*",
        "doctrine/orm": "2.12.0"
    },

Don't forget to run composer update

  • Related