diff --git a/typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-101163-Enumeration.rst b/typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-101163-Enumeration.rst index c5cf540f2ec7a2f1ec471ab71934bfa7a4ac1819..55d718cd780d89395406f5476d3532548a15808f 100644 --- a/typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-101163-Enumeration.rst +++ b/typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-101163-Enumeration.rst @@ -12,7 +12,9 @@ Description =========== The abstract class :php:`\TYPO3\CMS\Core\Type\Enumeration` is deprecated -in favor of PHP built-in backed enums. +in favor of PHP built-in backed `enums`_. + +.. _enums: https://www.php.net/manual/en/language.types.enumerations.php Impact ====== @@ -51,4 +53,6 @@ should be converted into: Existing method calls must be adapted. +See also :ref:`feature-101396-1689843367`. + .. index:: Backend, FullyScanned, ext:core diff --git a/typo3/sysext/core/Documentation/Changelog/13.0/Feature-101396-LetExtbaseHandleNativeEnums.rst b/typo3/sysext/core/Documentation/Changelog/13.0/Feature-101396-LetExtbaseHandleNativeEnums.rst index 574df1a9f96f6e5c6fdd0e67c2652361ae06f11b..170bc45fe74d461f14bcc15c3782fc1a405747e1 100644 --- a/typo3/sysext/core/Documentation/Changelog/13.0/Feature-101396-LetExtbaseHandleNativeEnums.rst +++ b/typo3/sysext/core/Documentation/Changelog/13.0/Feature-101396-LetExtbaseHandleNativeEnums.rst @@ -11,11 +11,13 @@ See :issue:`101396` Description =========== -With PHP 8.1, native support for enums has been introduced. This is quite handy +With PHP 8.1, native support for `enums`_ has been introduced. This is quite handy if a database field has a specific set of values which can be represented by a PHP enum. -It is now possible to use those enums in entities like this: +.. _enums: https://www.php.net/manual/en/language.types.enumerations.php + +It is now possible to use backed enums in entities like this: .. code-block:: php @@ -23,7 +25,7 @@ It is now possible to use those enums in entities like this: declare(strict_types=1); - namespace Vendor\Extension\Domain\Model\Enum; + namespace MyVendor\MyExtension\Domain\Model\Enum; enum Level: string { @@ -37,7 +39,9 @@ It is now possible to use those enums in entities like this: declare(strict_types=1); - namespace Vendor\Extension\Domain\Model; + namespace MyVendor\MyExtension\Domain\Model; + + use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; class LogEntry extends AbstractEntity { @@ -47,7 +51,7 @@ It is now possible to use those enums in entities like this: Impact ====== -To implement enums, it is no longer necessary to extend the TYPO3 core class -:php:`\TYPO3\CMS\Core\Type\Enumeration`. +To implement enums, it is no longer necessary to extend the now deprecated TYPO3 +Core class :php:`\TYPO3\CMS\Core\Type\Enumeration`. .. index:: PHP-API, ext:extbase