Skip to content

Commit

Permalink
Compatibilité Symfony 4
Browse files Browse the repository at this point in the history
  • Loading branch information
atapia-wbnt committed Jun 26, 2018
1 parent b73b81f commit 28578c1
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions DependencyInjection/Security/Factory/AbstractSsoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

Expand Down Expand Up @@ -38,7 +38,7 @@ protected function createAuthProvider(ContainerBuilder $container, $id, $config,
$provider = 'security.authentication.provider.sso.'.$id;

$container
->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.sso'))
->setDefinition($provider, new ChildDefinition('security.authentication.provider.sso'))
->replaceArgument(0, new Reference($userProviderId))
->replaceArgument(2, $config['create_users'])
->replaceArgument(3, $config['created_users_roles'])
Expand Down Expand Up @@ -67,7 +67,7 @@ protected function createLogoutSuccessHandler(ContainerBuilder $container, $id,

// don't know if this is the right way, but it works
$container
->setDefinition($realHandler.'.'.$id, new DefinitionDecorator($templateHandler))
->setDefinition($realHandler.'.'.$id, new ChildDefinition($templateHandler))
->addArgument($config)
;
}
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Security/Factory/OpenSsoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Webnet\SsoAuthBundle\DependencyInjection\Security\Factory;

use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;

/**
* @author: Jean-François Simon <contact@jfsimon.fr>
Expand All @@ -29,7 +29,7 @@ protected function createEntryPoint($container, $id, $config, $defaultEntryPoint
$entryPointId = 'security.authentication.open_sso_entry_point.'.$id;

$container
->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.open_sso_entry_point'))
->setDefinition($entryPointId, new ChildDefinition('security.authentication.open_sso_entry_point'))
->addArgument($config)
;

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Security/Factory/TrustedSsoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Webnet\SsoAuthBundle\DependencyInjection\Security\Factory;

use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;

/**
Expand Down Expand Up @@ -32,7 +32,7 @@ protected function createEntryPoint($container, $id, $config, $defaultEntryPoint
$entryPointId = 'security.authentication.trusted_sso_entry_point.'.$id;

$container
->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.trusted_sso_entry_point'))
->setDefinition($entryPointId, new ChildDefinition('security.authentication.trusted_sso_entry_point'))
->addArgument($config)
;

Expand Down
4 changes: 2 additions & 2 deletions Resources/config/cas.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</parameters>

<services>
<service id="webnet.sso_auth.protocol.cas" class="%webnet.sso_auth.protocol.cas.class%">
<service id="webnet.sso_auth.protocol.cas" class="%webnet.sso_auth.protocol.cas.class%" public="true">
<tag name="webnet.sso_auth.protocol" id="cas" />
</service>

<service id="webnet.sso_auth.server.cas" class="%webnet.sso_auth.server.cas.class%">
<service id="webnet.sso_auth.server.cas" class="%webnet.sso_auth.server.cas.class%" public="true">
<tag name="webnet.sso_auth.server" id="cas" />
</service>
</services>
Expand Down
2 changes: 1 addition & 1 deletion Sso/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Factory
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* @param \Buzz\Client\ClientInterface $client
*/
public function __construct(ContainerInterface $container, ClientInterface $client)
public function __construct(ContainerInterface $container, $client)
{
$this->container = $container;
$this->servers = array();
Expand Down
2 changes: 1 addition & 1 deletion Sso/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Manager
* @param ProtocolInterface $protocol
* @param \Buzz\Client\ClientInterface $client
*/
public function __construct(ServerInterface $server, ProtocolInterface $protocol, ClientInterface $client)
public function __construct(ServerInterface $server, ProtocolInterface $protocol, $client)
{
$this->server = $server;
$this->protocol = $protocol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

Expand Down Expand Up @@ -38,7 +38,7 @@ protected function createAuthProvider(ContainerBuilder $container, $id, $config,
$provider = 'security.authentication.provider.sso.'.$id;

$container
->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.sso'))
->setDefinition($provider, new ChildDefinition('security.authentication.provider.sso'))
->replaceArgument(0, new Reference($userProviderId))
->replaceArgument(2, $config['create_users'])
->replaceArgument(3, $config['created_users_roles'])
Expand Down Expand Up @@ -67,7 +67,7 @@ protected function createLogoutSuccessHandler(ContainerBuilder $container, $id,

// don't know if this is the right way, but it works
$container
->setDefinition($realHandler.'.'.$id, new DefinitionDecorator($templateHandler))
->setDefinition($realHandler.'.'.$id, new ChildDefinition($templateHandler))
->addArgument($config)
;
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/DependencyInjection/Security/Factory/OpenSsoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace BeSimple\SsoAuthBundle\DependencyInjection\Security\Factory;

use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;

/**
* @author: Jean-François Simon <contact@jfsimon.fr>
Expand All @@ -29,7 +29,7 @@ protected function createEntryPoint($container, $id, $config, $defaultEntryPoint
$entryPointId = 'security.authentication.open_sso_entry_point.'.$id;

$container
->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.open_sso_entry_point'))
->setDefinition($entryPointId, new ChildDefinition('security.authentication.open_sso_entry_point'))
->addArgument($config)
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace BeSimple\SsoAuthBundle\DependencyInjection\Security\Factory;

use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;

/**
Expand Down Expand Up @@ -32,7 +32,7 @@ protected function createEntryPoint($container, $id, $config, $defaultEntryPoint
$entryPointId = 'security.authentication.trusted_sso_entry_point.'.$id;

$container
->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.trusted_sso_entry_point'))
->setDefinition($entryPointId, new ChildDefinition('security.authentication.trusted_sso_entry_point'))
->addArgument($config)
;

Expand Down

0 comments on commit 28578c1

Please sign in to comment.