Skip to content

Commit

Permalink
IBX-1694: Rebranded dependency injection container service tags (#12)
Browse files Browse the repository at this point in the history
Ibexa service container tags were rebranded to follow new naming convention.

For more details see https://issues.ibexa.co/browse/IBX-1694
  • Loading branch information
alongosz authored Jan 17, 2022
1 parent 2cb5155 commit dd842a8
Show file tree
Hide file tree
Showing 28 changed files with 290 additions and 290 deletions.
12 changes: 6 additions & 6 deletions doc/specifications/document_field_mappers.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ as follows:

- all block documents
- `ContentFieldMapper`
- `ezpublish.search.solr.document_field_mapper.block`
- `ibexa.search.solr.field.mapper.block`
- all block documents per translation
- `ContentTranslationFieldMapper`
- `ezpublish.search.solr.field_mapper.block_translation`
- `ibexa.search.solr.field.mapper.block.translation`
- Content documents
- `ContentFieldMapper`
- `ezpublish.search.solr.document_field_mapper.content`
- `ibexa.search.solr.field.mapper.content`
- Content documents per translation
- `ContentTranslationFieldMapper`
- `ezpublish.search.solr.field_mapper.content_translation`
- `ibexa.search.solr.field.mapper.content.translation`
- Location documents
- `LocationFieldMapper`
- `ezpublish.search.solr.field_mapper.location`
- `ibexa.search.solr.field.mapper.location`

The following example shows how to index data from the parent Location content, in order to make it
available for full text search on the children content. A concrete use case could be indexing
Expand Down Expand Up @@ -130,5 +130,5 @@ my_webinar_app.webinar_event_title_fulltext_field_mapper:
- '@ezpublish.spi.persistence.content_handler'
- '@ezpublish.spi.persistence.location_handler'
tags:
- {name: ezpublish.search.solr.field_mapper.content}
- {name: ibexa.search.solr.field.mapper.content}
```
6 changes: 3 additions & 3 deletions src/bundle/DependencyInjection/IbexaSolrExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class IbexaSolrExtension extends Extension
*
* @var string
*/
public const ENDPOINT_TAG = 'ezpublish.search.solr.endpoint';
public const ENDPOINT_TAG = 'ibexa.search.solr.endpoint';

/**
* @var string
Expand Down Expand Up @@ -189,7 +189,7 @@ private function configureSearchServices(ContainerBuilder $container, $connectio
// Core filter
$coreFilterDefinition = new ChildDefinition(self::CORE_FILTER_ID);
$coreFilterDefinition->replaceArgument(0, new Reference($endpointResolverId));
$coreFilterDefinition->addTag('ezpublish.search.solr.core_filter', ['connection' => $connectionName]);
$coreFilterDefinition->addTag('ibexa.search.solr.core.filter', ['connection' => $connectionName]);
$coreFilterId = "$alias.connection.$connectionName.core_filter_id";
$container->setDefinition($coreFilterId, $coreFilterDefinition);

Expand All @@ -215,7 +215,7 @@ private function configureSearchServices(ContainerBuilder $container, $connectio
$gatewayDefinition = new ChildDefinition(self::GATEWAY_ID);
$gatewayDefinition->replaceArgument(1, new Reference($endpointResolverId));
$gatewayDefinition->replaceArgument(6, new Reference($distributionStrategyId));
$gatewayDefinition->addTag('ezpublish.search.solr.gateway', ['connection' => $connectionName]);
$gatewayDefinition->addTag('ibexa.search.solr.gateway', ['connection' => $connectionName]);

$gatewayId = "$alias.connection.$connectionName.gateway_id";
$container->setDefinition($gatewayId, $gatewayDefinition);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Container/Compiler/AggregateCriterionVisitorPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function process(ContainerBuilder $container)
);

$visitors = $container->findTaggedServiceIds(
'ezpublish.search.solr.query.content.criterion_visitor'
'ibexa.search.solr.query.content.criterion.visitor'
);

$this->addHandlers($aggregateContentCriterionVisitorDefinition, $visitors);
Expand All @@ -43,7 +43,7 @@ public function process(ContainerBuilder $container)
);

$visitors = $container->findTaggedServiceIds(
'ezpublish.search.solr.query.location.criterion_visitor'
'ibexa.search.solr.query.location.criterion.visitor'
);

$this->addHandlers($aggregateLocationCriterionVisitorDefinition, $visitors);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Container/Compiler/AggregateSortClauseVisitorPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function process(ContainerBuilder $container)
);

$visitors = $container->findTaggedServiceIds(
'ezpublish.search.solr.query.content.sort_clause_visitor'
'ibexa.search.solr.query.content.sort_clause.visitor'
);

$this->addHandlers($aggregateContentSortClauseVisitorDefinition, $visitors);
Expand All @@ -46,7 +46,7 @@ public function process(ContainerBuilder $container)
);

$visitors = $container->findTaggedServiceIds(
'ezpublish.search.solr.query.location.sort_clause_visitor'
'ibexa.search.solr.query.location.sort_clause.visitor'
);

$this->addHandlers($aggregateLocationSortClauseVisitorDefinition, $visitors);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Container/Compiler/CoreFilterRegistryPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

final class CoreFilterRegistryPass implements CompilerPassInterface
{
public const CORE_FILTER_SERVICE_TAG = 'ezpublish.search.solr.core_filter';
public const CORE_FILTER_SERVICE_TAG = 'ibexa.search.solr.core.filter';

public function process(ContainerBuilder $container): void
{
Expand All @@ -30,7 +30,7 @@ public function process(ContainerBuilder $container): void
foreach ($attributes as $attribute) {
if (!isset($attribute['connection'])) {
throw new LogicException(
"'ezpublish.search.solr.core_filter' service tag needs a 'connection' attribute " .
"'ibexa.search.solr.core.filter' service tag needs a 'connection' attribute " .
'to identify the Gateway.'
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Container/Compiler/EndpointRegistryPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public function process(ContainerBuilder $container)
'ezpublish.search.solr.gateway.endpoint_registry'
);

$endpoints = $container->findTaggedServiceIds('ezpublish.search.solr.endpoint');
$endpoints = $container->findTaggedServiceIds('ibexa.search.solr.endpoint');

foreach ($endpoints as $id => $attributes) {
foreach ($attributes as $attribute) {
if (!isset($attribute['alias'])) {
throw new LogicException(
"'ezpublish.search.solr.endpoint' service tag needs an 'alias' attribute " .
"'ibexa.search.solr.endpoint' service tag needs an 'alias' attribute " .
'to identify the endpoint.'
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class BlockFieldMapperPass extends BaseFieldMapperPass
{
public const AGGREGATE_MAPPER_SERVICE_ID = 'ezpublish.search.solr.field_mapper.block';
public const AGGREGATE_MAPPER_SERVICE_ID = 'ibexa.search.solr.field.mapper.block';
public const AGGREGATE_MAPPER_SERVICE_TAG = self::AGGREGATE_MAPPER_SERVICE_ID;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class BlockTranslationFieldMapperPass extends BaseFieldMapperPass
{
public const AGGREGATE_MAPPER_SERVICE_ID = 'ezpublish.search.solr.field_mapper.block_translation';
public const AGGREGATE_MAPPER_SERVICE_ID = 'ibexa.search.solr.field.mapper.block.translation';
public const AGGREGATE_MAPPER_SERVICE_TAG = self::AGGREGATE_MAPPER_SERVICE_ID;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class ContentFieldMapperPass extends BaseFieldMapperPass
{
public const AGGREGATE_MAPPER_SERVICE_ID = 'ezpublish.search.solr.field_mapper.content';
public const AGGREGATE_MAPPER_SERVICE_ID = 'ibexa.search.solr.field.mapper.content';
public const AGGREGATE_MAPPER_SERVICE_TAG = self::AGGREGATE_MAPPER_SERVICE_ID;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class ContentTranslationFieldMapperPass extends BaseFieldMapperPass
{
public const AGGREGATE_MAPPER_SERVICE_ID = 'ezpublish.search.solr.field_mapper.content_translation';
public const AGGREGATE_MAPPER_SERVICE_ID = 'ibexa.search.solr.field.mapper.content.translation';
public const AGGREGATE_MAPPER_SERVICE_TAG = self::AGGREGATE_MAPPER_SERVICE_ID;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class LocationFieldMapperPass extends BaseFieldMapperPass
{
public const AGGREGATE_MAPPER_SERVICE_ID = 'ezpublish.search.solr.field_mapper.location';
public const AGGREGATE_MAPPER_SERVICE_ID = 'ibexa.search.solr.field.mapper.location';
public const AGGREGATE_MAPPER_SERVICE_TAG = self::AGGREGATE_MAPPER_SERVICE_ID;
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/Container/Compiler/GatewayRegistryPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

final class GatewayRegistryPass implements CompilerPassInterface
{
public const GATEWAY_SERVICE_TAG = 'ezpublish.search.solr.gateway';
public const GATEWAY_SERVICE_TAG = 'ibexa.search.solr.gateway';

public function process(ContainerBuilder $container): void
{
Expand All @@ -30,7 +30,7 @@ public function process(ContainerBuilder $container): void
foreach ($attributes as $attribute) {
if (!isset($attribute['connection'])) {
throw new LogicException(
"'ezpublish.search.solr.gateway' service tag needs a 'connection' attribute " .
"'ibexa.search.solr.gateway' service tag needs a 'connection' attribute " .
'to identify the Gateway.'
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Resources/config/container/solr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ services:
- "@ezpublish.search.solr.result_extractor.location"
- "@ezpublish.search.solr.core_filter"
tags:
- {name: ezplatform.search_engine, alias: solr}
- {name: ibexa.search.engine, alias: solr}
lazy: true

ezpublish.spi.search.solr.indexer:
Expand All @@ -162,6 +162,6 @@ services:
$connection: "@ezpublish.persistence.connection"
$searchHandler: "@ezpublish.spi.search.solr"
tags:
- {name: ezplatform.search_engine.indexer, alias: solr}
- {name: ibexa.search.engine.indexer, alias: solr}
lazy: true

Loading

0 comments on commit dd842a8

Please sign in to comment.