SF2 Sylius:post-install-cmd事件以异常终止

时间:2014-03-13 20:55:13

标签: composer-php sylius symfony-2.4

我尝试使用以下命令安装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:安装导致:

  [InvalidArgumentException]                                                   
  There are no commands defined in the "doctrine:phpcr:repository" namespace.

还有其他人遇到过同样的问题吗?

1 个答案:

答案 0 :(得分:0)

我发现奇怪的是我们必须做一些文档中没有提及的操作。我今天再次尝试从一开始就安装sylius项目,一切似乎都很好。 正如sylius网站上提到的那样: “Sylius处于前阿尔法发展阶段。” 我猜团队做了一些改变。 Timon,我希望你今天能成功安装...... 最诚挚的问候。