---
title: "Deprecation: #67670 - Deprecate custom singleton logic in GeneralUtility::getUserObj"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-67670"
source: "Changelog/7.4/Deprecation-67670-DeprecateCustomSingletonLogicInGeneralUtilitygetUserObj.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Deprecation: #67670 - Deprecate custom singleton logic in GeneralUtility::getUserObj

See [forge#67670](https://forge.typo3.org/issues/67670)

## Description

The functionality of instantiating classes only once by calling `GeneralUtility::getUserObj($className)` multiple times
while having a `$className` that is prepended with an ampersand ("&") has been marked as deprecated.

An example of the deprecated behaviour in the ext_localconf.php of an extension:

```php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['pi1_hooks']['getResultRows_SQLpointer'] = '&Acme\\MyExtension\\Hooks\\MysqlFulltextIndexHook';
```

## Impact

Any calls to `GeneralUtility::getUserObj()` with a prefixed ampersand will throw a deprecation message.

## Affected Installations

TYPO3 Instances with extensions that use `getUserObj()` themselves and/or use hooks built with `getUserObj()` and use references.

## Migration

Check if the classes that hook into certain parts of your custom extensions really need to be referenced / instantiated once.
If so, implement the `SingletonInterface` of the TYPO3 Core, so the underlying function `GeneralUtility::makeInstance()`
will register the SingletonInterface only once.

The modified example from above now looks like this:

```php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['pi1_hooks']['getResultRows_SQLpointer'] = \Acme\MyExtension\Hooks\MysqlFulltextIndexHook::class;
```

While the class itself implements the SingletonInterface of the TYPO3 Core to only be instantiated once during a single request:

```php
<?php
namespace \Acme\MyExtension\Hooks;

class MysqlFulltextIndexHook implements \TYPO3\CMS\Core\Core\SingletonInterface {
	...
}
```
