Skip to content
Snippets Groups Projects

Issue #3248976: Add API documentation for Package Manager

2 unresolved threads
2 unresolved threads

Merge request reports

Approval is optional

Merged by Adam G-HAdam G-H 3 years ago (Feb 15, 2022 2:38pm UTC)

Merge details

  • Changes merged into 8.x-2.x with ec507ef1 (commits were squashed).
  • Did not delete the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
  • 50 * cannot be created until the current one is destroyed. If subscribers flag
    51 * errors during this event, the stage will release its ownership. This is
    52 * the earliest possible time to detect problems that might prevent the
    53 * stage from completing its life cycle successfully. Only dispatched once
    54 * during a stage's life cycle.
    55 *
    56 * - \Drupal\package_manager\Event\PostCreateEvent
    57 * Dispatched after the staging area is created, which means that nearly all
    58 * of the running Drupal code base (normally excluding things like public and
    59 * private files, SQLite databases, and other site-specific assets) has been
    60 * copied into a separate, temporary location. Only dispatched once during a
    61 * stage's life cycle.
    62 *
    63 * - \Drupal\package_manager\Event\PreRequireEvent
    64 * Dispatched before one or more Composer packages are required into the
    65 * staging area. May be dispatched multiple times during a stage's life cycle.
    • Comment on lines +64 to +65

      Not really a comment on this doc but is there no way for subscriber to know which packages will be required? Maybe we should pass the parameters to \Drupal\package_manager\Stage::require onto the \Drupal\package_manager\Event\PreRequireEvent constructor and then add getRequiredRuntimePackages() and ``getRequiredDevPackages()`. otherwise this event doesn't seem very useful.

      In our case in AutoUpdates we don't need this because we have \Drupal\automatic_updates\Updater::getPackageVersions but for any other use of Stage that doesn't set the version at the beginning I am not sure how they would get them here.

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

      changed this line in version 11 of the diff

    • Please register or sign in to reply
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
    Ted Bowman @tedbow started a thread on the diff
  • 90 *
    91 * The public API of any stage consists of at least four methods:
    92 *
    93 * - \Drupal\package_manager\Stage::create()
    94 * Creates the staging area, records ownership, and dispatches pre- and
    95 * post-create events.
    96 *
    97 * - \Drupal\package_manager\Stage::require()
    98 * Adds packages to the staging area and dispatches pre- and post-require
    99 * events.
    100 *
    101 * - \Drupal\package_manager\Stage::apply()
    102 * Copies changes from the staging area into the active directory, and
    103 * dispatches pre- and post-apply events.
    104 *
    105 * - \Drupal\package_manager\Stage::destroy()
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Ted Bowman
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 11 commits

    added 11 commits

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading