Class 未找到 CacheItemPoolInterface Symfony
Class CacheItemPoolInterface not Found Symfony
我正在使用 api-平台和 Symfony。它在本地完美运行,但是当我将它部署在 PREPROD 服务器上时,出现以下错误。
我完全不知道问题出在哪里。我接受任何提示谢谢!
Invalid service "cache.app": class Psr\Cache\CacheItemPoolInterface
not found.
这是我的作曲家:
{
"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"
}
}
我认为错误是由于您的生产配置而引发的,具体取决于 Symfony Cache component。
尝试明确要求它:
composer require symfony/cache
如果您收到它已经隐式安装的消息,它可能在生产环境中被禁用。
我正在使用 api-平台和 Symfony。它在本地完美运行,但是当我将它部署在 PREPROD 服务器上时,出现以下错误。
我完全不知道问题出在哪里。我接受任何提示谢谢!
Invalid service "cache.app": class Psr\Cache\CacheItemPoolInterface not found.
这是我的作曲家:
{
"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"
}
}
我认为错误是由于您的生产配置而引发的,具体取决于 Symfony Cache component。
尝试明确要求它:
composer require symfony/cache
如果您收到它已经隐式安装的消息,它可能在生产环境中被禁用。