Skip to content

Commit

Permalink
Remove ConsoleLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Aug 26, 2024
1 parent 10cdc31 commit 8152164
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 213 deletions.
3 changes: 0 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ parameters:
-
message: '~^Call to function is_bool\(\) with bool will always evaluate to true\.$~'
path: src/InlineParameterFormatter.php
-
message: '~^Call to an undefined method Symfony\\Component\\Console\\Output\\OutputInterface\:\:getErrorOutput\(\)\.$~'
path: src/Tools/Console/ConsoleLogger.php

# https://github.com/phpstan/phpstan/issues/5982
-
Expand Down
14 changes: 12 additions & 2 deletions src/Tools/Console/Command/DoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
use Doctrine\Migrations\Configuration\Connection\ConfigurationFile;
use Doctrine\Migrations\Configuration\Migration\ConfigurationFileWithFallback;
use Doctrine\Migrations\DependencyFactory;
use Doctrine\Migrations\Tools\Console\ConsoleLogger;
use Doctrine\Migrations\Tools\Console\Exception\DependenciesNotSatisfied;
use Doctrine\Migrations\Tools\Console\Exception\InvalidOptionUsage;
use Exception;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Logger\ConsoleLogger;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Console\Style\StyleInterface;
Expand Down Expand Up @@ -104,7 +105,16 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
return;
}

$logger = new ConsoleLogger($output);
$logger = new ConsoleLogger($output, [
LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL,
LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL,
LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL,
LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL,
LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL,
LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL,
LogLevel::INFO => OutputInterface::VERBOSITY_VERBOSE,
LogLevel::DEBUG => OutputInterface::VERBOSITY_VERY_VERBOSE,
]);
$dependencyFactory->setService(LoggerInterface::class, $logger);
$dependencyFactory->freeze();
}
Expand Down
134 changes: 0 additions & 134 deletions src/Tools/Console/ConsoleLogger.php

This file was deleted.

74 changes: 0 additions & 74 deletions tests/Tools/Console/ConsoleLoggerTest.php

This file was deleted.

0 comments on commit 8152164

Please sign in to comment.