Skip to content

Commit e32be54

Browse files
authored
#4 remove autoconfigure and autowiring from service definitions (#16)
1 parent 70b6bb3 commit e32be54

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

config/documentation.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,36 @@
1414
return static function (ContainerConfigurator $container) {
1515
$container->services()->set('twig_doc.controller.documentation', TwigDocController::class)
1616
->public()
17-
->autoconfigure()
18-
->autowire()
17+
->arg('$twig', service('twig'))
18+
->arg('$componentService', service('twig_doc.service.component'))
1919
->arg('$profiler', service('profiler')->nullOnInvalid())
2020
->set('twig_doc.service.category', CategoryService::class)
2121
->alias(CategoryService::class, 'twig_doc.service.category')
2222

2323
->set('twig_doc.service.component_factory', ComponentItemFactory::class)
2424
->public()
25-
->autoconfigure()
26-
->autowire()
25+
->arg('$validator', service('validator'))
26+
->arg('$categoryService', service('twig_doc.service.category'))
2727
->alias(ComponentItemFactory::class, 'twig_doc.service.component_factory')
2828

2929
->set('twig_doc.service.component', ComponentService::class)
3030
->public()
31-
->autoconfigure()
32-
->autowire()
31+
->arg('$itemFactory', service('twig_doc.service.component_factory'))
32+
->arg('$cache', service('cache.app'))
3333
->alias(ComponentService::class, 'twig_doc.service.component')
3434

3535
->set('twig_doc.twig.extension', TwigDocExtension::class)
36-
->autoconfigure()
37-
->autowire()
36+
->public()
37+
->arg('$componentRenderer', service('ux.twig_component.component_renderer')->nullOnInvalid())
38+
->arg('$componentService', service('twig_doc.service.component'))
39+
->arg('$categoryService', service('twig_doc.service.category'))
40+
->arg('$twig', service('twig'))
3841
->tag('twig.extension')
3942
->alias(TwigDocExtension::class, 'twig_doc.twig.extension')
4043

4144
->set('twig_doc.cache_warmer', ComponentsWarmer::class)
4245
->arg('$container', service('service_container'))
4346
->tag('kernel.cache_warmer')
47+
->alias(ComponentsWarmer::class, 'twig_doc.cache_warmer')
4448
;
4549
};

0 commit comments

Comments
 (0)