我尝试使用以下命令安装 sylius 项目:
composer create-project -s dev sylius/sylius-standard
但总是有同样的错误:
[InvalidArgumentException]
The class sylius.model.promotion_subject.class does not exists.
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
在 SyliusPromotionBundle 中,我注意到:
$interfaces = array(
'Sylius\Bundle\PromotionsBundle\Model\PromotionInterface' => 'sylius.model.promotion.class',
'Sylius\Bundle\PromotionsBundle\Model\CouponInterface' => 'sylius.model.promotion_coupon.class',
'Sylius\Bundle\PromotionsBundle\Model\RuleInterface' => 'sylius.model.promotion_rule.class',
'Sylius\Bundle\PromotionsBundle\Model\ActionInterface' => 'sylius.model.promotion_action.class',
'Sylius\Bundle\PromotionsBundle\Model\PromotionSubjectInterface' => 'sylius.model.promotion_subject.class',
);
所以,我尝试直接在 app/parameters.yml 中添加:
sylius.model.promotion_subject.class: "Sylius\Bundle\PromotionsBundle\Model\PromotionSubjectInterface"
它似乎有效,但我觉得这是一个丑陋的解决方案......
现在: app/console sylius:install 导致:
[InvalidArgumentException]
There are no commands defined in the "doctrine:phpcr:repository" namespace.
有没有其他人遇到过同样的问题?