Problem/Motivation

\Drupal\package_manager\Stage::getStageDirectory was added in #3250696: Each stage should have its own staging directory, to avoid filesystem and locking conflicts

Maybe we should see if anyone actually needs to be public. You can already get the staged packages via \Drupal\package_manager\Stage::getStageComposer. I think the problem with not making it public is that people will realize they can do $this->pathLocator->getStageDirectory() . "/$stage_id" to get the directory then if we wanted to somehow change this like using "stage_" . $stage_id" we couldn't change the pattern without breaking code.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tedbow created an issue. See original summary.

tedbow’s picture

tedbow’s picture

Title: Should `\Drupal\package_manager\Stage::getCurrentStageDirectory` be public » Make `\Drupal\package_manager\Stage::getStageDirectory` public
Issue summary: View changes
Related issues: +#3252126: Do not apply updates during cron if there are DB updates in the staging area

Seeing a need for this to public in #3252126: Do not apply updates during cron if there are DB updates in the staging area. we will to look for new update functions without actually loading the php files. So we need to be able to load the .install files and .post_update.php files. So we need to know the location of the staging directory.

tedbow’s picture

Status: Active » Needs review
phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

All I have is non-blocking nitpicks. Fix them if you want, but RTBC if you wanna just go ahead and commit anyway.

  • phenaproxima committed 1f2d2fa on 8.x-2.x authored by tedbow
    Issue #3251972 by tedbow, phenaproxima: Make `\Drupal\package_manager\...
phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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