Skip to content

Commit

Permalink
Migrate config into extension
Browse files Browse the repository at this point in the history
  • Loading branch information
loicsapone committed Nov 23, 2024
1 parent 5f77ddb commit 555ba87
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
32 changes: 32 additions & 0 deletions src/Bundle/DependencyInjection/IQ2iDataImporterExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

/*
* This file is part of the DataImporter package.
*
* (c) Loïc Sapone <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace IQ2i\DataImporter\Bundle\DependencyInjection;

use IQ2i\DataImporter\Command\GenerateDtoCommand;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class IQ2iDataImporterExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container): void
{
$container
->register('iq2i_data_importer.generate_dto_command', GenerateDtoCommand::class)
->addTag('console.command', ['command' => 'iq2i:data-importer:generate-dto'])
->setArguments([
'%kernel.project_dir%/src/Dto',
'App\\Dto',
]);
}
}
25 changes: 0 additions & 25 deletions src/Bundle/Resources/config/services.php

This file was deleted.

0 comments on commit 555ba87

Please sign in to comment.