将sylius项目从0.15更新到0.17后出现以下错误。另外Jackalope \ Session :: getNode方法失败并抛出超时错误,此方法的cpu和内存消耗非常高。
request.CRITICAL:未捕获的PHP异常 Symfony \ Component \ Debug \ Exception \ FatalErrorException:“编译错误: require():需要打开失败 '/srv/kulashare/app/cache/prod/doctrine/orm/Proxies/__CG__SyliusComponentUserModelUser.php' (include_path ='。:/ usr / share / php:')“at /srv/kulashare/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php 第209行{“例外”:“[对象] (Symfony \ Component \ Debug \ Exception \ FatalErrorException(代码:0): 编译错误:require():需要打开失败 '/srv/kulashare/app/cache/prod/doctrine/orm/Proxies/__CG__SyliusComponentUserModelUser.php' (include_path ='。:/ usr / share / php:')at /srv/kulashare/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)“} []
答案 0 :(得分:1)
当您与user-table的学说关系使用错误的UserModel-Entity时会发生这种情况:
而不是
@ORM\ManyToOne(targetEntity="Sylius\Component\User\Model\User", cascade={"persist"})
你应该使用:
@ORM\ManyToOne(targetEntity="Sylius\Component\Core\Model\User", cascade={"persist"})
这里的区别是命名空间Sylius \ Component \ Core vs Sylius \ Component \ User