Symfony 4自动装配无法调试

时间:2018-09-12 20:57:18

标签: autowired symfony4

我的自动接线发生了问题。可能有人帮我找到原因。调试命令bin/console debug:autowiring产生错误输出:

In XmlFileLoader.php line 383:                                                                                                   
Unable to parse file ".../var/cache/dev/srcDevDebugProjectContainer.xml".                                                                                                 

In XmlUtils.php line 101:                                                                                                                                                                                                                                
[ERROR 1840] Element '{http://symfony.com/schema/dic/services}argument',  attribute 'type': [facet 'enumeration'] The value 'binary' is not an element of the set {'collection', 'service', 'expression', 'string', 'constant', 'iterator', 'tagged'}. (in ... - line 4657, column 0)
[ERROR 1824] Element '{http://symfony.com/schema/dic/services}argument', attribute 'type': 'binary' is not a valid value of the atomic type '{http://symfony.com/schema/dic/services}argument_type'. (in ... - line 4657, column 0)
[ERROR 1840] Element '{http://symfony.com/schema/dic/services}argument', attribute 'type': [facet 'enumeration'] The value 'binary' is not an element of the set {'collection', 'service', 'expression', 'string', 'constant', 'iterator', 'tagged'}. (in ... - line 4658, column 0)
[ERROR 1824] Element '{http://symfony.com/schema/dic/services}argument', attribute 'type': 'binary' is not a valid value of the atomic type '{http://symfony.com/schema/dic/services}argument_type'. (in ... - line 4658, column 0)
[ERROR 1840] Element '{http://symfony.com/schema/dic/services}argument', attribute 'type': [facet 'enumeration'] The value 'binary' is not an element of the set {'collection', 'service', 'expression', 'string', 'constant', 'iterator', 'tagged'}. (in ... - line 4659, column 0)
[ERROR 1824] Element '{http://symfony.com/schema/dic/services}argument', attribute 'type': 'binary' is not a valid value of the atomic type '{http://symfony.com/schema/dic/services}argument_type'. (in ... - line 4659, column 0)

可能是描述为here的错误,但是我的参数中没有二进制字符串。其他调试命令正在运行。

1 个答案:

答案 0 :(得分:0)

好,这是我找到答案的方法。 srcDevDebugProjectContainer.xml中的第4657行将我指向参数.yaml文件中的语言环境部分

locales:
    de: "Deutsch\0000A0/\0000A0German"
    en: "English\0000A0/\0000A0English"
    lt: "Lietuvi\000173\0000A0/\0000A0Lithuanian"
    cs: "\00010Ce\000161tina\0000A0/\0000A0Czech"

我正在将其用于语言切换栏。我将它们更改为

locales:
    de: "Deutsch / German"
    en: "English / English"
    lt: "Lietuvių / Lithuanian"
    cs: "Čeština / Czech"

现在一切正常。