Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

Drupal core now uses a new \Drupal\workspaces\Event\WorkspacePrePublishEvent before publishing a workspace, which can also prevent the publication process based on custom criteria.

Similarly, a new \Drupal\workspaces\Event\WorkspacePostPublishEvent event is fired after a workspace is published, allowing custom code to do clean-up operations if needed.

Deprecations:

  • \Drupal\workspaces\WorkspaceAssociationInterface::postPublish() has been deprecated in favor of reacting to the post-publish event in the workspace association service.
  • \Drupal\workspaces\WorkspacePublisher::__construct() requires a new parameter: EventDispatcherInterface $event_dispatcher, to be passed before the source workspace parameter.
Impacts: 
Module developers