There is no extension able to load the configuration for “facebookbundle” symfony2

后端 未结 4 1054
死守一世寂寞
死守一世寂寞 2020-11-30 07:46

I create my own FacebookBundle and

I got this error:

There is no extension able to load the configuration for \"facebookbundle\" (in /facebo

4条回答
  •  感动是毒
    2020-11-30 08:05

    In order for custom config parameters to be accepted you have to define your bundle configuration using a Configuration.php class within your bundle.

    src/FacebookBundle/DependencyInjection/Configuration.php:

    root('facebookbundle');
    
            $rootNode
                ->children()
                    ->scalarNode('file')->defaultValue('')->end()
                    ->scalarNode('alias')->defaultValue('')->end()
                    ->scalarNode('app_id')->defaultValue('')->end()
                    ->scalarNode('secret')->defaultValue('')->end()
                    ->booleanNode('cookie')->defaultTrue()->end()
                    ->arrayNode('permissions')
                        ->canBeUnset()->prototype('scalar')->end()->end()
                ->end()
                ;
    
            return $treeBuilder;
        }
    }
    ?>
    

提交回复
热议问题