【问题标题】:failure during clear cash using symfony 4使用 symfony 4 清除现金时失败
【发布时间】:2021-04-03 15:52:20
【问题描述】:

我是 symfony 的新手,我尝试通过命令 composer require admin 安装软件包 admin panel,但它给了我错误 The deprecation template must contain the “% service_id%” placeholder,我执行了命令 composer update,并找到了一些答案(更新 easycorp/easyadmin-bundle,更新学说/教义迁移捆绑,更新 symfony/orm-pack)我尝试了这些命令,但它给了我错误:

Fatal error: Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure in D:
\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php on line 5876
Symfony\Component\ErrorHandler\Error\FatalError^ {#33
  -error: array:4 [
    "type" => 64
    "message" => "Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
    "file" => "D:\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php"
    "line" => 5876
  ]
  #message: "Compile Error: Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer():
 ?Closure"
  #code: 0
  #file: "D:\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php"
  #line: 5876
}

【问题讨论】:

  • 尝试更新依赖composer update easycorp/easyadmin-bundle --with-dependencies
  • 因为看起来即使 composer 命令也失败了,你可以做的是删除包(这不应该使 composer 崩溃),然后只需使用选项 --update-with-dependencies 再次要求它。如果仍然失败,请再次删除包并尝试再次要求它,这次使用--update-with-all-dependencies。如果仍然失败,请等待另一个答案或呼叫驱魔人;)

标签: php symfony


【解决方案1】:

更新一些学说包后我遇到了类似的问题。删除 var/cache 为我修复了它。

【讨论】:

    猜你喜欢
    • 2019-05-22
    • 1970-01-01
    • 1970-01-01
    • 2014-11-17
    • 1970-01-01
    • 1970-01-01
    • 2012-08-07
    • 1970-01-01
    • 2018-06-11
    相关资源
    最近更新 更多