Home  >  Q&A  >  body text

Symfony 5.4 migration: Doctrine\ORM\Configuration::setSchemaIgnoreClasses() method is undefined

I have a Symfony application made with 4.3 and I want to upgrade to Symfony 5.4

I followed the Symfony instructions but ran into a bug that seemed to be preventing cache warmup.

Script Cache: Clear returns error code 255

!! PHP Fatal Error: Uncaught Error: Call to undefined method DoctrineORMConfiguration::setSchemaIgnoreClasses() in .../var/cache/prod/ContainerIt7yNV0/App_KernelProdContainer.php:1338

I tried removing and then reinstalling all doctrine packages, but the problem persists. I read somewhere that this error only appears in doctrine-bundle 2.7.0 but here I am getting the same error in 2.0 too

Does anyone have an idea that could help me? This is composer.json:

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.2.5",
        "ext-ctype": "*",
        "ext-http": "*",
        "ext-iconv": "*",
        "ext-json": "*",
        "composer/package-versions-deprecated": "^1.11",
        "doctrine/doctrine-bundle": "^2.0",
        "doctrine/doctrine-migrations-bundle": "^2",
        "doctrine/orm": "^2",
        "phpdocumentor/reflection-docblock": "^5.2",
        "sensio/framework-extra-bundle": "^5.1",
        "symfony/apache-pack": "^1.0",
        "symfony/asset": "5.4.*",
        "symfony/console": "5.4.*",
        "symfony/dotenv": "5.4.*",
        "symfony/expression-language": "5.4.*",
        "symfony/flex": "^1.3.1",
        "symfony/form": "5.4.*",
        "symfony/framework-bundle": "5.4.*",
        "symfony/http-client": "5.4.*",
        "symfony/intl": "5.4.*",
        "symfony/mailer": "5.4.*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/notifier": "5.4.*",
        "symfony/process": "5.4.*",
        "symfony/property-access": "5.4.*",
        "symfony/property-info": "5.4.*",
        "symfony/proxy-manager-bridge": "5.4.*",
        "symfony/security-bundle": "5.4.*",
        "symfony/serializer": "5.4.*",
        "symfony/string": "5.4.*",
        "symfony/swiftmailer-bundle": "^3.4",
        "symfony/translation": "5.4.*",
        "symfony/twig-bundle": "5.4.*",
        "symfony/validator": "5.4.*",
        "symfony/web-link": "5.4.*",
        "symfony/webpack-encore-bundle": "^1.7",
        "symfony/yaml": "5.4.*",
        "twig/extra-bundle": "^2.12|^3.0",
        "twig/twig": "^2.12|^3.0"
    },
    "require-dev": {
        "symfony/browser-kit": "5.4.*",
        "symfony/css-selector": "5.4.*",
        "symfony/debug-bundle": "5.4.*",
        "symfony/maker-bundle": "^1.0",
        "symfony/phpunit-bridge": "^5.4",
        "symfony/stopwatch": "5.4.*",
        "symfony/var-dumper": "5.4.*",
        "symfony/web-profiler-bundle": "5.4"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\Tests\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "5.4.*",
            "docker": false
        }
    }
}

Thanks!

P粉434996845P粉434996845331 days ago685

reply all(1)I'll reply

  • P粉680487967

    P粉6804879672023-12-17 00:15:38

    Try to delete var/cache/prod manually. This may be a rights issue. (Write or delete /var/cache)

    reply
    0
  • Cancelreply