[Meta] Use Package Manger(From AutoUpdates) API to install via Composer

Created on 27 July 2022, almost 2 years ago
Updated 19 June 2024, 8 days ago

Problem/Motivation

To actually install via Composer we should the Package Manger module that is provided by the Automatic UPdates module

Proposed resolution

Here are issues

Testing blocker

#3299285: Change automated tests to use 7.4 and maybe add PHP requirement to 7.4 β†’ Basically blocks everything

Basic integration

Next most important issue is #3245770: Create a service to composer install via package_manager from Automatic Updates β†’ which just provides and service but does not provide UI for the functionality to the user

Validation

After #3245770 is done we can start to build the individual validators to make sure the service will only doing Composer changes that are expected and allowed, πŸ“Œ [policy, no patch] Determine Composer validation rules for installing through Composer Fixed

The validators will be individual event subscribers.
Here are the validators needed to implement #3300061

Add validation into Package Manager directly
Must have for secure updates:

  1. #3305564: Create a validator to stop newly installed packages from overwriting existing directories on apply β†’
  2. #3305568: Create a validator that detects duplicate info.yml files in the stage on apply β†’
  3. #3307369: Validate all changed or updated Drupal projects with Update XML β†’

User warnings

  1. #3307611: Create a validator to add a warning if updated extensions have database updates β†’

Validation added to Project Browser

  1. Operations that update Drupal core will not be allowed see #3249550: Create a validator to ensure core was not updated during a project install β†’
  2. #3304569: Validate package names are in the correct format in Installer β†’

Related:

  1. #3306722: Update Installer service to work without requiring to specify the package version β†’
  2. #3309025: Document that Stage::require() does not need version numbers β†’

The actual validators we need will be determined by πŸ“Œ [policy, no patch] Determine Composer validation rules for installing through Composer Fixed . Package Manager provides basic validation like the file system can updated and the correct version of Composer so these will not be needed.

Checking the status of the system

Automatic Updates has the ReadinessCheckEvent to determine if the system is ready to update

in #3304367: Add StatusCheckEvent to report errors and warnings in the staging error to the user β†’ we will move the functionality into Package Manager so that Project Browser can use it directly

Expose the functionality to the user

#3284945: Install endpoints that leverage Package Manager + core APIs β†’
This is issue is in progress but should be updated to use the service provided in #3245770: Create a service to composer install via package_manager from Automatic Updates β†’
It does not to wait all the validator issues to be done before it can be worked but should not be committed until all the validators need are done. Once #3245770 is done this issue can start to test that it responds to validation correctly by using test validators. See \Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber and it is used in \Drupal\Tests\automatic_updates\Functional\UpdaterFormTest::testUpdateErrors

🌱 Plan
Status

Fixed

Version

1.0

Component

Other

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024