protected function DeprecationAnalyser::createModifiedNeonFile in Upgrade Status 8
Creates the final config file in the temporary directory.
Return value
bool
1 call to DeprecationAnalyser::createModifiedNeonFile()
File
- src/
DeprecationAnalyser.php, line 385
Class
Namespace
Drupal\upgrade_statusCode
protected function createModifiedNeonFile() {
$module_path = drupal_get_path('module', 'upgrade_status');
$unmodified_neon_file = DRUPAL_ROOT . "/{$module_path}/deprecation_testing.neon";
$config = file_get_contents($unmodified_neon_file);
$neon = Neon::decode($config);
$neon['parameters']['tmpDir'] = $this->upgradeStatusTemporaryDirectory . '/phpstan';
$success = file_put_contents($this->phpstanNeonPath, Neon::encode($neon), Neon::BLOCK);
if (!$success) {
$this->logger
->error($this
->t("Couldn't write configuration for PHPStan: @file.", [
'@file' => $this->phpstanNeonPath,
]));
}
return $success ? TRUE : FALSE;
}