Problem/Motivation
Had some talks with @bnjmnm and @phenaproxima about this problem space
In #3284945: Install endpoints that leverage Package Manager + core APIs Project Browser is also firing the PreCreateEvent to check if the system meets all its requirements, but if another subscriber assumes a create is about to happen this could be a problem. In AutoUpdates we are using ReadinessCheckEvent but that is a AutoUpdates class and Project Browser just requires package_manager
In \Drupal\automatic_updates\Form\UpdateReady \Drupal\automatic_updates_extensions\Form\UpdateReady we call our StagedDatabaseUpdateValidator to warn the user about database updates. StagedDatabaseUpdateValidator is validator because it stops Cron updates
In #3293427: Display all projects that will be updated in Extensions confirmation form we will be displaying other dependencies that have been updated
Project browser also will need to display the messages about DB updates and new projects modules that have been updated or added.
Right now we have to build the logic into the form. But we could just fire StatusCheckEvent and display any warning. The forms themselve won't have to have any particular of what things to check.
Proposed resolution
Create StatusCheckEvent that will show warning and errors to the user.
It would be the module developers responsibility to show the warnings and error and to not allow the user to continue if there are errors.
then do #3304417: Deprecate ReadinessCheckEvent in favor of StatusCheckEvent in package manager
Issue fork automatic_updates-3304367
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
tedbowI pushed up a very rough start. Setting to Needs Review to get some feedback on the general idea.
Comment #5
tedbowI removed all changes unrelated to package_manager
Comment #6
tedbowComment #8
tedbowComment #9
tedbowComment #10
tedbowall issues resolved
Comment #14
tedbowComment #16
tedbowComment #18
tedbow