首頁  >  問答  >  主體

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粉434996845331 天前681

全部回覆(1)我來回復

  • P粉680487967

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

    嘗試手動刪除 var/cache/prod 。 這可能是權利問題。 (寫入或刪除/var/cache)

    回覆
    0
  • 取消回覆