Skip to content

Commit

Permalink
Updates opportus/object-mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
opportus committed Dec 11, 2020
1 parent 36b4309 commit 5bc4c57
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 88 deletions.
32 changes: 0 additions & 32 deletions DependencyInjection/Compiler/MappingPredefinitionPass.php

This file was deleted.

34 changes: 0 additions & 34 deletions DependencyInjection/MapBuilderFactory.php

This file was deleted.

11 changes: 6 additions & 5 deletions DependencyInjection/OpportusObjectMapperExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Opportus\ObjectMapperBundle\DependencyInjection;

use Opportus\ObjectMapper\Map\Filter\FilterInterface;
use Opportus\ObjectMapper\Map\MapBuilderInterface;
use Opportus\ObjectMapper\Map\Route\Point\PointFactoryInterface;
use Opportus\ObjectMapper\Map\Route\RouteBuilderInterface;
use Opportus\ObjectMapper\ObjectMapperInterface;
use Opportus\ObjectMapper\Map\MapBuilderInterface;
use Opportus\ObjectMapper\Point\CheckPointInterface;
use Opportus\ObjectMapper\Point\PointFactoryInterface;
use Opportus\ObjectMapper\Route\RouteBuilderInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
Expand Down Expand Up @@ -38,6 +38,7 @@ public function load(array $configs, ContainerBuilder $container)
$container->setAlias(MapBuilderInterface::class, 'opportus_object_mapper.map_builder');
$container->setAlias(ObjectMapperInterface::class, 'opportus_object_mapper.object_mapper');

$container->registerForAutoconfiguration(FilterInterface::class)->addTag('object_mapper.filter');
$container->registerForAutoconfiguration(PathFinderInterface::class)->addTag('opportus_object_mapper.path_finder');
$container->registerForAutoconfiguration(CheckPointInterface::class)->addTag('opportus_object_mapper.check_point');
}
}
9 changes: 0 additions & 9 deletions OpportusObjectMapperBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Opportus\ObjectMapperBundle;

use Opportus\ObjectMapperBundle\DependencyInjection\Compiler\MappingPredefinitionPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
Expand All @@ -15,11 +13,4 @@
*/
final class OpportusObjectMapperBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new MappingPredefinitionPass());
}
}
9 changes: 2 additions & 7 deletions Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,20 @@

<services>

<service id="opportus_object_mapper.point_factory" class="Opportus\ObjectMapper\Map\Route\Point\PointFactory" public="false"></service>
<service id="opportus_object_mapper.point_factory" class="Opportus\ObjectMapper\Point\PointFactory" public="false"></service>

<service id="opportus_object_mapper.route_builder" class="Opportus\ObjectMapper\Map\Route\RouteBuilder" public="false">
<service id="opportus_object_mapper.route_builder" class="Opportus\ObjectMapper\Route\RouteBuilder" public="false">
<argument type="service" id="opportus_object_mapper.point_factory" />
</service>

<service id="opportus_object_mapper.map_builder" class="Opportus\ObjectMapper\Map\MapBuilder" public="false">
<factory class="Opportus\ObjectMapperBundle\DependencyInjection\MapBuilderFactory" method="createMapBuilder"/>
<argument type="service" id="opportus_object_mapper.route_builder" />
<argument type="collection" /><!-- Routes. -->
<argument type="collection" /><!-- Filters. All services with tag "object_mapper_filter" are stored here by pass. -->
</service>

<service id="opportus_object_mapper.object_mapper" class="Opportus\ObjectMapper\ObjectMapper" public="false">
<argument type="service" id="opportus_object_mapper.map_builder" />
</service>

<service id="opportus_object_mapper_bundle.map_builder_factory" class="Opportus\ObjectMapperBundle\DependencyInjection\MapBuilderFactory" public="false"></service>

</services>

</container>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"require": {
"php": "^7.1.0",
"opportus/object-mapper": "v1.0.0-alpha.10",
"opportus/object-mapper": "v1.0.0-beta.6",
"symfony/http-kernel": "^4.0",
"symfony/dependency-injection": "^4.0",
"symfony/config": "^4.0"
Expand Down

0 comments on commit 5bc4c57

Please sign in to comment.