Skip to content

Commit afd8a25

Browse files
authored
Merge pull request #687 from XWB/controller_service
Register controller as service
2 parents 53f51db + 8102891 commit afd8a25

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

DependencyInjection/FOSCommentExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function load(array $configs, ContainerBuilder $container)
5252
$container->setDefinition('fos_comment.entity_manager', $def);
5353
}
5454

55-
foreach (array('events', 'form', 'twig', 'sorting', 'model') as $basename) {
55+
foreach (array('controller', 'events', 'form', 'twig', 'sorting', 'model') as $basename) {
5656
$loader->load(sprintf('%s.xml', $basename));
5757
}
5858

Resources/config/controller.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<!--
4+
This file is part of the FOSCommentBundle package.
5+
6+
(c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7+
8+
This source file is subject to the MIT license that is bundled
9+
with this source code in the file LICENSE.
10+
-->
11+
12+
<container xmlns="http://symfony.com/schema/dic/services"
13+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
15+
16+
<services>
17+
<service id="fos_comment.controller.thread" class="FOS\CommentBundle\Controller\ThreadController" public="true">
18+
<tag name="controller.service_arguments" />
19+
<call method="setContainer">
20+
<argument type="service" id="service_container" />
21+
</call>
22+
</service>
23+
</services>
24+
25+
</container>

0 commit comments

Comments
 (0)