replace services.xml into services.yml
This commit is contained in:
parent
5078e8360a
commit
7ffb1e80bf
@ -3,7 +3,7 @@
|
|||||||
namespace Wallabag\CoreBundle\DependencyInjection;
|
namespace Wallabag\CoreBundle\DependencyInjection;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
|
|
||||||
@ -11,8 +11,8 @@ class WallabagCoreExtension extends Extension
|
|||||||
{
|
{
|
||||||
public function load(array $configs, ContainerBuilder $container)
|
public function load(array $configs, ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||||
$loader->load('services.xml');
|
$loader->load('services.yml');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAlias()
|
public function getAlias()
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" ?>
|
|
||||||
|
|
||||||
<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">
|
|
||||||
|
|
||||||
<services>
|
|
||||||
<!-- Twig -->
|
|
||||||
<service id="wallabag_core.twig.wallabag" class="Wallabag\CoreBundle\Twig\Extension\WallabagExtension">
|
|
||||||
<tag name="twig.extension" />
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<!-- Security -->
|
|
||||||
<service id="wsse.security.authentication.provider"
|
|
||||||
class="Wallabag\CoreBundle\Security\Authentication\Provider\WsseProvider" public="false">
|
|
||||||
<argument /> <!-- User Provider -->
|
|
||||||
<argument>%kernel.cache_dir%/security/nonces</argument>
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<service id="wsse.security.authentication.listener"
|
|
||||||
class="Wallabag\CoreBundle\Security\Firewall\WsseListener" public="false">
|
|
||||||
<argument type="service" id="security.context"/>
|
|
||||||
<argument type="service" id="security.authentication.manager" />
|
|
||||||
<argument type="service" id="logger" />
|
|
||||||
<tag name="monolog.logger" channel="wsse" />
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
|
|
||||||
</container>
|
|
15
src/Wallabag/CoreBundle/Resources/config/services.yml
Normal file
15
src/Wallabag/CoreBundle/Resources/config/services.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
wallabag_core.twig.wallabag:
|
||||||
|
class: Wallabag\CoreBundle\Twig\Extension\WallabagExtension
|
||||||
|
tags:
|
||||||
|
- { name: twig.extension }
|
||||||
|
wsse.security.authentication.provider:
|
||||||
|
class: Wallabag\CoreBundle\Security\Authentication\Provider\WsseProvider
|
||||||
|
public: false
|
||||||
|
arguments: ['', '%kernel.cache_dir%/security/nonces']
|
||||||
|
wsse.security.authentication.listener:
|
||||||
|
class: Wallabag\CoreBundle\Security\Firewall\WsseListener
|
||||||
|
public: false
|
||||||
|
tags:
|
||||||
|
- { name: monolog.logger, channel: wsse }
|
||||||
|
arguments: ['@security.context', '@security.authentication.manager', '@logger']
|
Loading…
x
Reference in New Issue
Block a user