Skip to content
Snippets Groups Projects

Issue #3278411: Always use FileSystemInterface::getTempDirectory() to get the temporary directory

Merged Issue #3278411: Always use FileSystemInterface::getTempDirectory() to get the temporary directory
1 unresolved thread
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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

  • Adam G-H changed this line in version 5 of the diff

    changed this line in version 5 of the diff

  • Please register or sign in to reply
  • Adam G-H added 1 commit

    added 1 commit

    • 4c8a71d5 - Store staging root persistently

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • fc56a01b - Store staging root in separate key

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • e8156da2 - Move the staging root delete to markAsAvailable

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading