Breaking: #101131 - Convert LoginType to native backed enum

See forge#101131


The class \TYPO3\CMS\Core\Authentication\LoginType is now converted to a native backed enum.


Since \TYPO3\CMS\Core\Authentication\LoginType is no longer a class, the existing class constants are no longer available.

Affected installations

Custom authenticators using the following class constants:

  • \TYPO3\CMS\Core\Authentication\LoginType::LOGIN

  • \TYPO3\CMS\Core\Authentication\LoginType::LOGOUT


Use the new syntax: \TYPO3\CMS\Core\Authentication\LoginType::LOGIN->value \TYPO3\CMS\Core\Authentication\LoginType::LOGOUT->value

Alternatively, use the enum method tryFrom to convert a value to an enum. For direct comparison of two enums, the null coalescing operator shall be used to ensure that the parameter is a string:


use TYPO3\CMS\Core\Authentication\LoginType;

if (LoginType::tryFrom($value ?? '') === LoginType::LOGIN) {
    // Do login stuff
if (LoginType::tryFrom($value ?? '') === LoginType::LOGOUT) {
    // Do logout stuff