diff --git a/DependencyInjection/IrsteaPlantUmlExtension.php b/DependencyInjection/IrsteaPlantUmlExtension.php index 5698ceb8a1f9744f98bbb641fa84c519a6424674..6c8a63cc78cd0504914ed34a16462b23a393b92c 100644 --- a/DependencyInjection/IrsteaPlantUmlExtension.php +++ b/DependencyInjection/IrsteaPlantUmlExtension.php @@ -138,7 +138,7 @@ class IrsteaPlantUmlExtension extends Extension } else { $container ->setDefinition($decoratorId, new DefinitionDecorator('irstea.plant_uml.decorator.composite.template')) - ->replaceArgument(0, $decorators); + ->setArguments([$decorators]); } $filter = $this->loadFilter($decoratorId, $config, $container) ?: $defaultFilter; @@ -164,7 +164,7 @@ class IrsteaPlantUmlExtension extends Extension if (in_array($type, ['entity', 'associations', 'fields'])) { $container ->setDefinition($id, new DefinitionDecorator("irstea.plant_uml.decorator.$type.template")) - ->replaceArgument(0, $em); + ->setArguments([$em]); return new Reference($id); } @@ -184,7 +184,7 @@ class IrsteaPlantUmlExtension extends Extension $namespaceId = "$id.namespace"; $container ->setDefinition($namespaceId, new DefinitionDecorator('irstea.plant_uml.namespaces.entities.template')) - ->replaceArgument(0, $em); + ->setArguments([$em]); return new Reference($namespaceId); } @@ -218,9 +218,7 @@ class IrsteaPlantUmlExtension extends Extension */ protected function addService(ContainerBuilder $container, $id, $class, array $arguments = []) { - $container - ->setDefinition($id, new Definition($class, $arguments)) - ->setPublic(false); + $container->setDefinition($id, new Definition($class, $arguments)); return new Reference($id); } } diff --git a/Resources/config/services.yml b/Resources/config/services.yml index a55b5f2657e55e6494b6bc46a1513ab8dd1ff697..d489f19e11f6dd4b46c5c30636089ccfa5861830 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -9,17 +9,17 @@ services: class: Irstea\PlantUmlBundle\Model\ClassFilterInterface abstract: true factory: ["@irstea.plant_uml.filter.factory", create] - arguments: [[], []] + public: false irstea.plant_uml.finder.classes.template: class: Irstea\PlantUmlBundle\Finder\ClassFinder abstract: true - arguments: [null] + public: false irstea.plant_uml.finder.entities.template: class: Irstea\PlantUmlBundle\Doctrine\EntityFinder abstract: true - arguments: [null] + public: false irstea.plant_uml.decorator.inheritance: class: Irstea\PlantUmlBundle\Model\Decorator\InheritanceDecorator @@ -42,17 +42,17 @@ services: irstea.plant_uml.decorator.entity.template: class: Irstea\PlantUmlBundle\Doctrine\EntityDecorator abstract: true - arguments: [null] + public: false irstea.plant_uml.decorator.associations.template: class: Irstea\PlantUmlBundle\Doctrine\AssociationDecorator abstract: true - arguments: [null] + public: false irstea.plant_uml.decorator.fields.template: class: Irstea\PlantUmlBundle\Doctrine\FieldDecorator abstract: true - arguments: [null] + public: false irstea.plant_uml.decorator.filtered.template: class: Irstea\PlantUmlBundle\Model\Decorator\FilteringDecorator @@ -63,7 +63,6 @@ services: class: Irstea\PlantUmlBundle\Model\Decorator\CompositeDecorator abstract: true public: false - arguments: [[]] irstea.plant_uml.namespaces.php: class: Irstea\PlantUmlBundle\Model\Namespace_\Php\RootNamespace @@ -78,4 +77,4 @@ services: irstea.plant_uml.namespaces.entities.template: class: Irstea\PlantUmlBundle\Doctrine\DoctrineNamespace abstract: true - arguments: [null] + public: false