Problem/Motivation
As of #3278411: Always use FileSystemInterface::getTempDirectory() to get the temporary directory, it doesn't make a whole lot of sense for this method to be protected. We don't want other code overriding it, since that breaks a bunch of our logic in terms of keeping things clean. Quoth @tedbow in Slack:
I think our logic around deleting assumes they are all in the same place. This is why we picked unique sub-directories based on the stage id also.
Because in the case where you break a stage lock but the update is the middle of the call to $this->beginner->begin() the old stage may still be copy files into its sub-directory because we can’t actually kill the composer-stager process. But that is not problem because no other Stage operations will be able to act on it because of checkOwnership() and we will delete the staging root in destroy() so a left over directory will be deleted on the next destroy even if it’s lock was broken during `$this->beginner->begin() . But if any Stage can use a different staging root none of that works
Proposed resolution
Make this method private and find another way to override it in tests.
Issue fork automatic_updates-3278435
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
Comment #3
tedbowComment #5
phenaproximaMerged into 8.x-2.x. Thanks!