Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

remove getRegistry() and unsetRegistry() that E_USER_DEPRECATED at Registry Placeholder #127

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/Helper/Placeholder/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,6 @@ class Registry
*/
protected $items = [];

/**
* Retrieve or create registry instance
*
* @return Registry
*/
public static function getRegistry()
{
trigger_error('Placeholder view helpers should no longer use a singleton registry', E_USER_DEPRECATED);
if (null === static::$instance) {
static::$instance = new static();
}

return static::$instance;
}

/**
* Unset the singleton
*
* Primarily useful for testing purposes; sets {@link $instance} to null.
*
* @return void
*/
public static function unsetRegistry()
{
trigger_error('Placeholder view helpers should no longer use a singleton registry', E_USER_DEPRECATED);
static::$instance = null;
}

/**
* Set the container for an item in the registry
*
Expand Down