protected function DeprecationAnalyser::prepareTempDirectory in Upgrade Status 8
Prepare temporary directories for Upgrade Status.
The created directories in Drupal's temporary directory are needed to dynamically set a temporary directory for PHPStan's cache in the neon file provided by Upgrade Status.
Return value
bool True if the temporary directory is created, false if not.
1 call to DeprecationAnalyser::prepareTempDirectory()
File
- src/
DeprecationAnalyser.php, line 362
Class
Namespace
Drupal\upgrade_statusCode
protected function prepareTempDirectory() {
$success = $this->fileSystem
->prepareDirectory($this->upgradeStatusTemporaryDirectory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
if (!$success) {
$this->logger
->error($this
->t("Unable to create temporary directory for Upgrade Status: @directory.", [
'@directory' => $this->upgradeStatusTemporaryDirectory,
]));
return $success;
}
$phpstan_cache_directory = $this->upgradeStatusTemporaryDirectory . '/phpstan';
$success = $this->fileSystem
->prepareDirectory($phpstan_cache_directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
if (!$success) {
$this->logger
->error($this
->t("Unable to create temporary directory for PHPStan: @directory.", [
'@directory' => $phpstan_cache_directory,
]));
}
return $success;
}