Issue #3278411: Always use FileSystemInterface::getTempDirectory() to get the temporary directory
Merged
requested to merge issue/automatic_updates-3278411:3278411-always-use-filesysteminterfacegettempdirectory into 8.x-2.x
1 unresolved thread
Merge request reports
Activity
541 540 if (!$this->lock) { 542 541 throw new \LogicException(__METHOD__ . '() cannot be called because the stage has not been created or claimed.'); 543 542 } 544 return $this->getStagingRoot() . DIRECTORY_SEPARATOR . $this->lock[0]; 543 544 // Since the staging root can depend on site settings, store the stage 545 // directory path so that things won't break if the staging root changes 546 // during this stage's life cycle. 547 $dir = $this->getMetadata('stage_directory'); - Comment on lines +544 to +547
Since are considering the case where the staging root changes during the update cycle should we consider this in
destroy()
now to? Right now we delete$this->getStagingRoot()
but in the case we are handling here our stage directory would not be in there.The other option would be to store
$this->setMetadata('stage_root', $dir);
instead in\Drupal\package_manager\Stage::getStagingRoot
and actually error if there were to change during the update cycle as this could lead to unexpected outcomes changed this line in version 5 of the diff
added 1 commit
- e8156da2 - Move the staging root delete to markAsAvailable
Please register or sign in to reply