2012-04-27 86 views
2

我試圖安裝JMSPaymentCoreBundle的master分支,並試圖使用文檔中的一些代碼。獲取錯誤:無法使用Symfony2加載類型「jms_choose_payment_method」JMSPaymentCoreBundle

上執行

$this->getFormFactory()->create('jms_choose_payment_method'... 

,我發現了錯誤:

未能加載類型 「jms_choose_payment_method」

我安裝了DEPS文件包。我已經完成了registerBundle(在AppKernel.php中)和registerNamespace(在autoload.php中)。我可以看到該文件的供應商\ \捆綁JMS \付款方式\ CoreBundle \表格\ ChoosePaymentMethodType.php存在,並且該供應商\ \捆綁JMS \付款方式\ CoreBundle \資源\ CONFIG \ payment.xml不包含:

<?xml version="1.0" ?> 

<container xmlns="http://symfony.com/schema/dic/services" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> 

<parameters> 
... 
    <parameter key="payment.form.choose_payment_method_type.class">JMS\Payment\CoreBundle\Form\ChoosePaymentMethodType</parameter> 
... 
</parameters> 

<services> 
... 
    <service id="payment.form.choose_payment_method_type" class="%payment.form.choose_payment_method_type.class%"> 
     <argument type="service" id="payment.plugin_controller" /> 
     <tag name="form.type" alias="jms_choose_payment_method" /> 
    </service> 
</services> 
</container> 

我做錯了什麼?或者,這是一個錯誤?

回答

1

此捆綁包目前僅適用於symfony 2.1

相關問題