Deprecation: #95320 - Various method arguments in Authentication objects

See forge#95320

Description

The following methods of the classes TYPO3\CMS\Core\Authentication\AbstractUserAuthentication and TYPO3\CMS\Core\Authentication\BackendUserAuthentication have their first argument been marked as deprecated:

  • AbstractUserAuthentication->writeUC()

  • AbstractUserAuthentication->unpack_uc()

  • BackendUserAuthentication->backendCheckLogin()

The following method has its third argument marked as deprecated:

  • BackendUserAuthentication->isInWebMount()

Impact

Calling these methods with an explicit argument of the deprecated arguments given will trigger a PHP E_USER_DEPRECATED error.

Affected installations

TYPO3 installations with custom extensions calling these methods with the deprecated arguments which is highly unlikely.

Migration

Call AbstractUserAuthentication->writeUC() without a method argument. If you need to explicitly set a custom UC value which is not AbstractUserAuthentication->uc, you can set this via AbstractUserAuthentication->uc = $myValue; in the line before.

Call AbstractUserAuthentication->unpack_uc() without an method argument. If you need to explicitly set a custom UC value which is not AbstractUserAuthentication->uc, you can set this via AbstractUserAuthentication->uc = $myValue; in the line before.

Call BackendUserAuthentication->backendCheckLogin() without an argument but wrap this call in a try {} catch (\Throwable $e) if you need the old behavior and want to avoid a deprecation message.

Call BackendUserAuthentication->isInWebMount() without the third argument and check for the return value of being null which is the equivalent of the expected RuntimeException being thrown when the third argument was set to true.