Symfony fosmessagebundle无法将fos_消息声明为服务

Symfony fosmessagebundle无法将fos_消息声明为服务,symfony,fosuserbundle,Symfony,Fosuserbundle,我想覆盖的NewThreadMessageFormType 1.不需要删除主题 2 css设计,即定制表单以使用Form_rowform.recipient 而不是 {{form_widgetform}} 我发现依赖性错误 我已成功定制了配置文件+编辑表单 但对消息包执行相同的步骤并不起作用 短暂性脑缺血发作 //-----------------------------------错误 [Symfony\Component\DependencyInjection\Exception\Inval

我想覆盖的NewThreadMessageFormType 1.不需要删除主题 2 css设计,即定制表单以使用Form_rowform.recipient 而不是 {{form_widgetform}} 我发现依赖性错误 我已成功定制了配置文件+编辑表单 但对消息包执行相同的步骤并不起作用 短暂性脑缺血发作 //-----------------------------------错误

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
Unable to replace alias "conn_user_new_thread.new_thread_form.type" with             "fos_message.new_thread_form.type".

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The service definition "conn_user_new_thread.new_thread_form.type" does not exist.
//-----------------------------------

//----------------------------------- services.yml:

conn_user_new_thread.new_thread_form.type:
    class: Conn\AaBundle\FormType\NewThreadMessageFormType
    # arguments: [%fos_message.thread_class%]
    tags:
        - { name: form.type, alias: conn_user_new_thread }
//------------------------------- 名称空间连接\AaBundle\FormType

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use FOS\MessageBundle\FormType\NewThreadMessageFormType as mBaseType;

class NewThreadMessageFormType extends mBaseType{
.....
....
....
public function getName()
{
    return 'conn_user_new_thread';
}

我在xxx\xxxBundle\config文件夹中有一个services.yml和一个services.xml 正在编辑services.yml 没有人读过。 对services.xml文件进行更改为我解决了这个问题。 我在同一文件夹中有一个routing.yml文件用于路由 这让我很困惑 归功于@stof

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use FOS\MessageBundle\FormType\NewThreadMessageFormType as mBaseType;

class NewThreadMessageFormType extends mBaseType{
.....
....
....
public function getName()
{
    return 'conn_user_new_thread';
}