我正在使用Symfony 3.4,并创建了一个自定义的FormType。我想将一些参数从twig模板传递给这种类型的表单字段。根据Symfony Docs的说法,这应该是可能的: {# render a widget, but add a "foo" class to it #}
{{ form_widget(form.name, { 'attr': {'class': 'foo'} })
我准备将一个庞大的网站从Symfony 3.4迁移到Symfony 4.4。为此,我从Symfony 4.4的新安装开始,由于基础项目需要使用Twig扩展,所以我尝试在这个新的Symfony 4.4项目上安装它。twig/extensions => Your requirements could not be resolved to an installable set of packages.之后
我创建了一个新