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

  1. Deprecate ReadinessCheck and make all our ReadinessCheckEvent listeners listen to StatusCheck
  2. in all the places we are firing ReadinessCheckEvent also fire StatusCheckEvent
  3. Remove Drupal\automatic_updates\Validator\PackageManagerReadinessCheck and all the service definitions that use it.
  4. Determine if we can also remove \Drupal\package_manager\Validator\PreOperationStageValidatorInterface
Command icon 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

tedbow created an issue. See original summary.

tedbow’s picture

I 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.

tedbow’s picture

Title: Move ReadinessCheckEvent into package manager » Deprecate ReadinessCheckEvent in favor of StatusCheckEvent in package manager
Issue summary: View changes
Status: Active » Postponed
traviscarden’s picture

phenaproxima made their first commit to this issue’s fork.

omkar.podey made their first commit to this issue’s fork.

phenaproxima’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #3314764: Stop listening to ReadinessCheckEvent. Closing this one and transferring credit.