Symfony 4自动装配无法调试

问题描述 投票:0回答:1

我的自动装配出现了问题。愿有人帮我找到原因。调试命令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的错误,但我的参数中没有二进制字符串。其他调试命令正在运行。

autowired symfony4
1个回答
0
投票

好的,我是如何找到答案的。 srcDevDebugProjectContainer.xml中的第4657行将我指向参数.yaml文件中的locales部分

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"

现在一切都很好。

© www.soinside.com 2019 - 2024. All rights reserved.