2012-07-31 37 views
0

我试图建立一个自定义登记表与我下面的一切结束,但我对这个https://github.com/FriendsOfSymfony/FOSUserBundle/blob/1.2.0/Resources/doc/overriding_forms.mdSymfony2的FOS UserBundle登记表格解析错误

帮助出现以下错误:

ParseException: Unable to parse in "\/home\/shokora\/git\/extrastufi\/src\/ExtraStufi\/DatabaseBundle\/DependencyInjection\/.. \/Resources\/config\/services.yml" at line 10 (near " arguments: [%fos_user.model.user.class%]"). 


in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/Yaml/Parser.php line 227 
at Parser->parse() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/Yaml/Parser.php line 168 
at Parser->parse() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/Yaml/Parser.php line 168 
at Parser->parse() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/Yaml/Yaml.php line 73 
at Yaml::parse() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php line 242 
at YamlFileLoader->loadFile() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php line 42 
at YamlFileLoader->load() in /home/shokora/git/extrastufi/src/ExtraStufi/DatabaseBundle/DependencyInjection/ExtraStufiDatabaseExtension.php line 26 
at ExtraStufiDatabaseExtension->load() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php line 42 
at MergeExtensionConfigurationPass->process() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php line 39 
at MergeExtensionConfigurationPass->process() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php line 119 
at Compiler->compile() in /home/shokora/git/extrastufi/vendor/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php line 437 
at ContainerBuilder->compile() in /home/shokora/git/extrastufi/app/bootstrap.php.cache line 872 
at Kernel->buildContainer() in /home/shokora/git/extrastufi/app/bootstrap.php.cache line 783 
at Kernel->initializeContainer() in /home/shokora/git/extrastufi/app/bootstrap.php.cache line 517 
at Kernel->boot() in /home/shokora/git/extrastufi/app/bootstrap.php.cache line 548 
at Kernel->handle() in /home/shokora/git/extrastufi/web/app_dev.php line 27 

在services.yml的代码是

parameters: 
# extra_stufi_database.example.class: ExtraStufi\DatabaseBundle\Example 

services: 
# extra_stufi_database.example: 
#  class: %extra_stufi_database.example.class% 
#  arguments: [@service_id, "plain_value", %parameter%] 
    extra_stufi_database.registration.form.type: 
     class: ExtraStufi\DatabaseBundle\Form\Type\RegistrationFormType 
      arguments: [%fos_user.model.user.class%] 
      tags: 
       - { name: form.type, alias: student_user_registration } 

(对不起,我没有包括这项权利了,这是在关机的最后10分钟冰:P)。

回答

0

此错误是说,你有你的

/home中的语法错误/ shokora /混帐/ extrastufi/src目录/ ExtraStufi/DatabaseBundle/DependencyInjection/.. /Resources/config/services.yml

文件在第10行。你能发布这个文件的内容吗?

+0

哦,对了,那是愚蠢的。它现在在OP中:) – shokora 2012-08-01 08:09:01

0

更改FileLoader与YAML之一:

$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 
+0

由于这个问题很老,我不能自由地检查这个解决方案。但如果有人相信这会解决原来的问题,我会将其标记为已接受。 – shokora 2014-01-08 14:32:58