Problem/Motivation

Right now, there's a discrepancy in the way Package Manager resolves the system temporary directory (where the staging area is created). In \Drupal\package_manager\ProcessFactory::getComposerHomePath(), we use FileSystemInterface::getTempDirectory(), and in \Drupal\package_manager\Stage::getStagingRoot() we use FileSystem::getOsTemporaryDirectory().

The difference is that the former will first try to use the file_temp_path setting before falling back to the system temporary directory, and the latter doesn't. This needs to be made consistent.

Steps to reproduce

Proposed resolution

Always use FileSystemInterface::getTempDirectory() to get the temporary file path.

Remaining tasks

Do it, and write tests.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Assigned: Unassigned » tedbow
Status: Active » Needs review

Assigning to @tedbow for review.

phenaproxima’s picture

Assigning to @tedbow for review.

tedbow’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#3278435: Make Stage::getStagingRoot() private

Looks good!

tedbow’s picture

Status: Reviewed & tested by the community » Needs review
phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

I suspect this was accidentally kicked from RTBC to NR, so restoring RTBC.

  • phenaproxima committed caa09dd on 8.x-2.x
    Issue #3278411 by phenaproxima, tedbow: Always use FileSystemInterface::...
phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

Merged into 8.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tedbow credited AjitS.

tedbow’s picture