Skip to content

Commit

Permalink
pre-print
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 16, 2023
1 parent c74f121 commit f0efaee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Symfony\Component\Yaml\Parser;
use Symplify\PhpConfigPrinter\Contract\CaseConverterInterface;
use Symplify\PhpConfigPrinter\Contract\Converter\ServiceOptionsKeyYamlToPhpFactoryInterface;
use Symplify\PhpConfigPrinter\Contract\NodeVisitor\PrePrintNodeVisitorInterface;
use Symplify\PhpConfigPrinter\Contract\RoutingCaseConverterInterface;
use Symplify\PhpConfigPrinter\NodeFactory\ContainerConfiguratorReturnClosureFactory;
use Symplify\PhpConfigPrinter\NodeFactory\RoutingConfiguratorReturnClosureFactory;
Expand All @@ -29,6 +30,8 @@
__DIR__ . '/../src/CaseConverter'
)->tag(CaseConverterInterface::class);

// \Symplify\PhpConfigPrinter\Contract\NodeVisitor\PrePrintNodeVisitorInterface

$services->load(
'Symplify\\PhpConfigPrinter\\RoutingCaseConverter\\',
__DIR__ . '/../src/RoutingCaseConverter'
Expand All @@ -49,6 +52,9 @@
$services->set(\Symplify\PhpConfigPrinter\NodeFactory\Service\ServiceOptionNodeFactory::class)
->arg('$serviceOptionKeyYamlToPhpFactories', tagged_iterator(ServiceOptionsKeyYamlToPhpFactoryInterface::class));

$services->set(\Symplify\PhpConfigPrinter\Printer\PhpParserPhpConfigPrinter::class)
->arg('$prePrintNodeVisitors', tagged_iterator(PrePrintNodeVisitorInterface::class));

$services->set(NodeFinder::class);
$services->set(Parser::class);
$services->set(BuilderFactory::class);
Expand Down
2 changes: 1 addition & 1 deletion src/Printer/PhpParserPhpConfigPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class PhpParserPhpConfigPrinter extends Standard
public function __construct(
private readonly ImportFullyQualifiedNamesNodeTraverser $importFullyQualifiedNamesNodeTraverser,
private readonly EmptyLineNodeDecorator $emptyLineNodeDecorator,
private readonly array $prePrintNodeVisitors
private readonly iterable $prePrintNodeVisitors
) {
parent::__construct();
}
Expand Down

0 comments on commit f0efaee

Please sign in to comment.