搜索

首页  >  问答  >  正文

Symfony 5.4迁移:Doctrine\ORM\Configuration::setSchemaIgnoreClasses()方法未定义

我有一个由 4.3 制作的 Symfony 应用程序,我想升级到 Symfony 5.4

我按照 Symfony 说明进行操作,但遇到了一个错误,该错误似乎阻止了缓存预热。

脚本缓存:清除返回错误代码 255

!! PHP 致命错误:未捕获错误:调用未定义的方法 DoctrineORMConfiguration::setSchemaIgnoreClasses() 中 .../var/cache/prod/ContainerIt7yNV0/App_KernelProdContainer.php:1338

我尝试删除然后重新安装所有教义包,但问题仍然存在。 我在某处读到此错误仅出现在doctrine-bundle 2.7.0 中,但在这里我在 2.0 中也出现了相同的错误

有人有一个可以帮助我的想法吗? 这是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
        }
    }
}

谢谢!

P粉434996845P粉434996845377 天前735

全部回复(1)我来回复

  • P粉680487967

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

    尝试手动删除 var/cache/prod 。 这可能是一个权利问题。 (写入或删除/var/cache)

    回复
    0
  • 取消回复