我正在使用api平台和Symfony。它在本地完美运行,但是当我在PREPROD服务器上部署它时,出现以下错误。
我根本不知道问题是什么。我有任何提示谢谢!
无效的服务“ cache.app”:类Psr \ Cache \ CacheItemPoolInterface 找不到。
这是我的作曲家:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-iconv": "*",
"api-platform/api-pack": "^1.1",
"erc/pdfmerger": "^0.0.1",
"setasign/fpdf": "1.8.1",
"symfony/console": "^4.0",
"symfony/flex": "^1.0",
"symfony/form": "^4.0",
"symfony/framework-bundle": "^4.0",
"symfony/lts": "^4@dev",
"symfony/monolog-bundle": "^3.2",
"symfony/yaml": "^4.0"
},
"require-dev": {
"symfony/dotenv": "^4.0",
"symfony/web-server-bundle": "^4.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false
},
"public-dir": "www"
}
}
答案 0 :(得分:0)
我认为由于您的生产配置(取决于Symfony Cache component)而引发了错误。
尝试明确要求:
composer require symfony/cache
如果收到消息,表明它已隐式安装,则可能已在生产环境中将其禁用。