Breaking: #101175 - Convert VersionState to native backed enum
See forge#101175
Description
The class \TYPO3\
is now
converted to a native PHP backed enum.
Impact
Since \TYPO3\
is no longer
a class, the existing class constants are no longer available, but are
enum instances instead.
In addition it's not possible to instantiate it anymore or call
the equals
method.
Affected installations
TYPO3 code using the following code:
Using the following class constants:
\TYPO3\
CMS\ Core\ Versioning\ Version State:: DEFAULT_ STATE \TYPO3\
CMS\ Core\ Versioning\ Version State:: NEW_ PLACEHOLDER \TYPO3\
CMS\ Core\ Versioning\ Version State:: DELETE_ PLACEHOLDER \TYPO3\
CMS\ Core\ Versioning\ Version State:: MOVE_ POINTER
Class instantiation:
new \
TYPO3\ CMS\ Core\ Versioning\ (Version State::*->value)
where * denotes one of the enum values.
Method invocation:
\TYPO3\
CMS\ Core\ Versioning\ Version State:: cast () \TYPO3\
CMS\ Core\ Versioning\ Version State:: cast ()->equals ()
Migration
Use the new syntax for getting the values:
\TYPO3\
CMS\ Core\ Versioning\ Version State:: DEFAULT_ STATE->value \TYPO3\
CMS\ Core\ Versioning\ Version State:: NEW_ PLACEHOLDER->value \TYPO3\
CMS\ Core\ Versioning\ Version State:: DELETE_ PLACEHOLDER->value \TYPO3\
CMS\ Core\ Versioning\ Version State:: MOVE_ POINTER->value
Class instantiation should be replaced by:
\TYPO3\
CMS\ Core\ Versioning\ Version State:: try From ($row ['t3ver_ state'])
Method invocation of cast
/equals
should be replaced by:
\TYPO3\
CMS\ Core\ Versioning\ Version State:: try From (...) \TYPO3\
CMS\ Core\ Versioning\ Version State:: try From (...) === Version State:: MOVE_ POINTER