Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

Commit c0de243

Browse files
kunicmarko20jordisala1991
authored andcommitted
commands as services
1 parent 4c95ef1 commit c0de243

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/DependencyInjection/SonataCacheExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function load(array $configs, ContainerBuilder $container)
4141
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
4242
$loader->load('cache.xml');
4343
$loader->load('counter.xml');
44+
$loader->load('command.xml');
4445

4546
$useOrm = 'auto' == $config['cache_invalidation']['orm_listener'] ?
4647
class_exists('Doctrine\\ORM\\Version') :

src/Resources/config/command.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
3+
<services>
4+
<service id="Sonata\CacheBundle\Command\CacheFlushAllCommand" class="Sonata\CacheBundle\Command\CacheFlushAllCommand" public="true">
5+
<tag name="console.command"/>
6+
</service>
7+
<service id="Sonata\CacheBundle\Command\CacheFlushCommand" class="Sonata\CacheBundle\Command\CacheFlushCommand" public="true">
8+
<tag name="console.command"/>
9+
</service>
10+
</services>
11+
</container>

0 commit comments

Comments
 (0)