Commit a1642973 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Correction d'un bug dans les templates de services.

No related merge requests found
Showing with 11 additions and 14 deletions
+11 -14
......@@ -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);
}
}
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment