Use class names for service names

This commit is contained in:
Oliver Davies 2019-04-18 21:27:51 +01:00
parent 0779825f80
commit 685fbe5188
4 changed files with 6 additions and 9 deletions

View file

@ -38,6 +38,7 @@ class GenerateCommand extends Command
$io = new SymfonyStyle($input, $output);
try {
// TODO: Inject this.
new Builder($this->filters($input), $outputFile = $this->outputFile($input));
$io->success(sprintf('%s file generated.', $outputFile));

View file

@ -2,6 +2,7 @@
namespace Opdavies\GmailFilterBuilder\Container;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@ -13,7 +14,7 @@ class CommandCompilerClass implements CompilerPassInterface
*/
public function process(ContainerBuilder $container)
{
$definition = $container->findDefinition('app.cli');
$definition = $container->findDefinition(Application::class);
$taggedServices = $container->findTaggedServiceIds('ConsoleCommand');
foreach ($taggedServices as $id => $tags) {