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, #3300061: [policy, no patch] Determine Composer validation rules for installing through Composer
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:
- #3305564: Create a validator to stop newly installed packages from overwriting existing directories on apply
- #3305568: Create a validator that detects duplicate info.yml files in the stage on apply
- #3307369: Validate all changed or updated Drupal projects with Update XML
User warnings
Validation added to Project Browser
- Operations that update Drupal core will not be allowed see #3249550: Create a validator to ensure core was not updated during a project install
- #3304569: Validate package names are in the correct format in Installer
Related:
- #3306722: Update Installer service to work without requiring to specify the package version
- #3309025: Document that Stage::require() does not need version numbers
The actual validators we need will be determined by #3300061: [policy, no patch] Determine Composer validation rules for installing through Composer. 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
Comments
Comment #2
narendrarAdded tag for Install directly via GUI using Package Manager + core APIs
Comment #3
tedbowComment #4
tedbowComment #5
tedbowComment #6
tedbowComment #7
tedbowComment #8
tim.plunkettComment #9
volegerAll related issues are closed. Is anything left related to this plan?
Comment #10
chrisfromredfinAll these are closed!