Skip to content

Commit 0f8042d

Browse files
Fix Transformer configuration & add missing aliases on monolog handlers
1 parent f2586cb commit 0f8042d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/CleverAgeProcessBundle.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
use CleverAge\ProcessBundle\DependencyInjection\Compiler\CheckSerializerCompilerPass;
1717
use CleverAge\ProcessBundle\DependencyInjection\Compiler\RegistryCompilerPass;
18-
use CleverAge\ProcessBundle\Registry\TransformerRegistry;
1918
use Symfony\Component\DependencyInjection\ContainerBuilder;
2019
use Symfony\Component\HttpKernel\Bundle\Bundle;
2120

@@ -29,7 +28,7 @@ public function build(ContainerBuilder $container): void
2928
parent::build($container);
3029

3130
$container->addCompilerPass(
32-
new RegistryCompilerPass(TransformerRegistry::class, 'cleverage.transformer', 'addTransformer')
31+
new RegistryCompilerPass('cleverage_process.registry.transformer', 'cleverage.transformer', 'addTransformer')
3332
);
3433

3534
$container->addCompilerPass(new CheckSerializerCompilerPass());

src/DependencyInjection/CleverAgeProcessExtension.php

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\DependencyInjection\Definition;
2020
use Symfony\Component\DependencyInjection\Extension\Extension;
2121
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
22+
use Symfony\Component\DependencyInjection\Reference;
2223
use Symfony\Component\Finder\Finder;
2324

2425
/**
@@ -45,6 +46,10 @@ public function load(array $configs, ContainerBuilder $container): void
4546
$transformerDefinition = new Definition(GenericTransformer::class);
4647
$transformerDefinition->setAutowired(true);
4748
$transformerDefinition->setPublic(false);
49+
$transformerDefinition->setArguments([
50+
new Reference('cleverage_process.context.contextual_option_resolver'),
51+
new Reference('cleverage_process.registry.transformer'),
52+
]);
4853
$transformerDefinition->addMethodCall('initialize', [$transformerCode, $transformerConfig]);
4954
$transformerDefinition->addTag('cleverage.transformer');
5055

0 commit comments

Comments
 (0)