Problem/Motivation
I talked to @bnjmnm who was working on #3284945: Install endpoints that leverage Package Manager + core APIs for Project Browser
To check if Composer installs would work here was doing
$pre_create_event = $this->eventDispatcher->dispatch(new PreCreateEvent($this->stage));
which will work but if any subscriber listens to this performs operations that should only happen when a install starts this could be a problem.
He can't use ReadinessChecks here because that is only in Automatic Updates
Proposed resolution
#3304367: Add StatusCheckEvent to report errors and warnings in the staging error to the user then
- Deprecate ReadinessCheck and make all our ReadinessCheckEvent listeners listen to StatusCheck
- in all the places we are firing ReadinessCheckEvent also fire StatusCheckEvent
- Remove
Drupal\automatic_updates\Validator\PackageManagerReadinessCheckand all the service definitions that use it. - Determine if we can also remove \Drupal\package_manager\Validator\PreOperationStageValidatorInterface
Issue fork automatic_updates-3304417
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 just moved the class for now I haven't actually done the deprecation part yet. I am sure what that would look like.
I would like think at least we would need to dispatch the old event everyone we are dispatching the new event and combine the results. That was if there are any custom subscribers to the current event their results would still appear everywhere they do now.
Comment #4
tedbowPostponing on #3304367: Add StatusCheckEvent to report errors and warnings in the staging error to the user
Comment #5
traviscarden commentedLooks like #3304367: Add StatusCheckEvent to report errors and warnings in the staging error to the user is fixed.
Comment #9
phenaproximaThis is a duplicate of #3314764: Stop listening to ReadinessCheckEvent. Closing this one and transferring credit.