Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-1853: Rebranded services names #16

Merged
merged 5 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace Ibexa\Bundle\Rest\DependencyInjection\Compiler;

use Ibexa\Rest\FieldTypeProcessorRegistry;
use LogicException;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand All @@ -17,11 +18,11 @@ class FieldTypeProcessorPass implements CompilerPassInterface

public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('ezpublish_rest.field_type_processor_registry')) {
if (!$container->hasDefinition(FieldTypeProcessorRegistry::class)) {
return;
}

$definition = $container->getDefinition('ezpublish_rest.field_type_processor_registry');
$definition = $container->getDefinition(FieldTypeProcessorRegistry::class);

$taggedServiceIds = $container->findTaggedServiceIds(
self::FIELD_TYPE_PROCESSOR_SERVICE_TAG
Expand Down
5 changes: 3 additions & 2 deletions src/bundle/DependencyInjection/Compiler/InputHandlerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace Ibexa\Bundle\Rest\DependencyInjection\Compiler;

use Ibexa\Rest\Input\Dispatcher;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
Expand All @@ -22,11 +23,11 @@ class InputHandlerPass implements CompilerPassInterface

public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('ezpublish_rest.input.dispatcher')) {
if (!$container->hasDefinition(Dispatcher::class)) {
return;
}

$definition = $container->getDefinition('ezpublish_rest.input.dispatcher');
$definition = $container->getDefinition(Dispatcher::class);

$taggedServiceIds = $container->findTaggedServiceIds(self::INPUT_HANDLER_SERVICE_TAG);
foreach ($taggedServiceIds as $id => $attributes) {
Expand Down
5 changes: 3 additions & 2 deletions src/bundle/DependencyInjection/Compiler/InputParserPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace Ibexa\Bundle\Rest\DependencyInjection\Compiler;

use Ibexa\Contracts\Rest\Input\ParsingDispatcher;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
Expand All @@ -22,11 +23,11 @@ class InputParserPass implements CompilerPassInterface

public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('ezpublish_rest.input.parsing_dispatcher')) {
if (!$container->hasDefinition(ParsingDispatcher::class)) {
return;
}

$definition = $container->getDefinition('ezpublish_rest.input.parsing_dispatcher');
$definition = $container->getDefinition(ParsingDispatcher::class);

$taggedServiceIds = $container->findTaggedServiceIds(self::INPUT_PARSER_SERVICE_TAG);
foreach ($taggedServiceIds as $id => $attributes) {
Expand Down
5 changes: 3 additions & 2 deletions src/bundle/DependencyInjection/Compiler/OutputVisitorPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace Ibexa\Bundle\Rest\DependencyInjection\Compiler;

use Ibexa\Rest\Server\View\AcceptHeaderVisitorDispatcher;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
Expand All @@ -24,11 +25,11 @@ class OutputVisitorPass implements CompilerPassInterface

public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('ezpublish_rest.output.visitor.dispatcher')) {
if (!$container->hasDefinition(AcceptHeaderVisitorDispatcher::class)) {
return;
}

$definition = $container->getDefinition('ezpublish_rest.output.visitor.dispatcher');
$definition = $container->getDefinition(AcceptHeaderVisitorDispatcher::class);

$visitors = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace Ibexa\Bundle\Rest\DependencyInjection\Compiler;

use Ibexa\Contracts\Rest\Output\ValueObjectVisitorDispatcher;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
Expand All @@ -20,11 +21,11 @@ class ValueObjectVisitorPass implements CompilerPassInterface

public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('ezpublish_rest.output.value_object_visitor.dispatcher')) {
if (!$container->hasDefinition(ValueObjectVisitorDispatcher::class)) {
return;
}

$definition = $container->getDefinition('ezpublish_rest.output.value_object_visitor.dispatcher');
$definition = $container->getDefinition(ValueObjectVisitorDispatcher::class);

$taggedServiceIds = $container->findTaggedServiceIds(
self::OUTPUT_VALUE_OBJECT_VISITOR_SERVICE_TAG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace Ibexa\Bundle\Rest\DependencyInjection\Security;

use Ibexa\Rest\Server\Security\RestLogoutHandler;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginFactory;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
Expand Down Expand Up @@ -34,14 +35,14 @@ protected function createListener($container, $id, $config, $userProvider)
/* @var \Symfony\Component\DependencyInjection\ContainerBuilder $container */
$listenerId .= '.' . $id;
$container->setDefinition($listenerId, $listener);
$container->setAlias('ezpublish_rest.session_authenticator', $listenerId);
$container->setAlias('ibexa.rest.session_authenticator', $listenerId);

if ($container->hasDefinition('security.logout_listener.' . $id)) {
// Copying logout handlers to REST session authenticator, to allow proper logout using it.
$logoutListenerDef = $container->getDefinition('security.logout_listener.' . $id);
$logoutListenerDef->addMethodCall(
'addHandler',
[new Reference('ezpublish_rest.security.authentication.logout_handler')]
[new Reference(RestLogoutHandler::class)]
);

foreach ($logoutListenerDef->getMethodCalls() as $callArray) {
Expand All @@ -58,7 +59,7 @@ protected function createListener($container, $id, $config, $userProvider)

protected function getListenerId(): string
{
return 'ezpublish_rest.security.authentication.listener.session';
return 'ibexa.rest.security.authentication.listener.session';
}

public function getPosition(): string
Expand Down
Loading