By amateescu on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
The return value of WorkspaceManager::getActiveWorkspace() when there is no active workspace was previously undocumented (it returned FALSE). This has been changed and documented to return NULL instead.
This change was made to enable better use of null-safe operators and type hints. For example, when you need to execute a method on the active workspace, instead of a conditional block using hasActiveWorkspace(), the code be simplified to:
$active_workspace_id = $this->workspaceManager->getActiveWorkspace()?->id();
Impacts:
Module developers