You are here

public function DeprecationAnalyser::__construct in Upgrade Status 8

Constructs a \Drupal\upgrade_status\DeprecationAnalyser.

Parameters

\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory: The key/value factory.

\Psr\Log\LoggerInterface $logger: The logger.

\Symfony\Component\Console\Input\StringInput $input: The Symfony Console input interface.

\Symfony\Component\Console\Output\BufferedOutput $output: The Symfony Console output interface.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\GuzzleHttp\Client $http_client: HTTP client.

\Drupal\Core\File\FileSystemInterface $file_system: File system service.

File

src/DeprecationAnalyser.php, line 117

Class

DeprecationAnalyser

Namespace

Drupal\upgrade_status

Code

public function __construct(KeyValueFactoryInterface $key_value_factory, LoggerInterface $logger, StringInput $input, BufferedOutput $output, ConfigFactoryInterface $config_factory, Client $http_client, FileSystemInterface $file_system) {
  $this->scanResultStorage = $key_value_factory
    ->get('upgrade_status_scan_results');

  // Log errors to an upgrade status logger channel.
  $this->logger = $logger;
  $this->inputInterface = $input;
  $this->outputInterface = $output;
  $this->config = $config_factory
    ->get('upgrade_status.settings');
  $this->httpClient = $http_client;
  $this->fileSystem = $file_system;
  $this
    ->populateAutoLoader();
  $this->upgradeStatusTemporaryDirectory = file_directory_temp() . '/upgrade_status';
  $this->phpstanNeonPath = $this->upgradeStatusTemporaryDirectory . '/deprecation_testing.neon';
  if (!file_exists($this->phpstanNeonPath)) {
    $this
      ->prepareTempDirectory();
    $this
      ->createModifiedNeonFile();
  }
}