Breaking: #101291 - Introduce capabilities bit set
See forge#101291
Description
The capabilities property of the Resource
and drivers
(Local
/Abstract
) have been converted from an integer
(holding a bit value) to an instance of a new Bit
class
\TYPO3\
.
This affects the public API of the following interface methods:
\TYPO3\
CMS\ Core\ Resource\ Driver\ Driver Interface:: get Capabilities () \TYPO3\
CMS\ Core\ Resource\ Driver\ Driver Interface:: merge Configuration Capabilities ()
In consequence, all mentioned methods of implementations are affected as well, those of:
\TYPO3\
CMS\ Core\ Resource\ Driver\ Abstract Driver:: get Capabilities () \TYPO3\
CMS\ Core\ Resource\ Driver\ Local Driver:: merge Configuration Capabilities ()
Also the following constants have been removed:
\TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ BROWSABLE \TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ PUBLIC \TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ WRITABLE \TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ HIERARCHICAL_ IDENTIFIERS
Impact
The return type of the following methods, respective their implementations have
changed from int
to \TYPO3\
:
\TYPO3\
CMS\ Core\ Resource\ Driver\ Driver Interface:: get Capabilities () \TYPO3\
CMS\ Core\ Resource\ Driver\ Driver Interface:: merge Configuration Capabilities ()
The type of the parameter $capabilities
of the method
merge
has been changed from int
to
\TYPO3\
.
The usage of the mentioned, removed constants of
\TYPO3\
will lead to errors.
Affected installations
Installations that implement custom drivers and therefore directly implement
\TYPO3\
or extend
\TYPO3\
.
Also, installations that use the removed constants of
\TYPO3\
.
Migration
When using mentioned methods that formerly returned the bit value as integer or
expected the bit value as integer parameter need to use the Capabilities
class instead. It behaves exactly the same as the plain integer. If the plain
integer value needs to be retrieved, __
can be called on
Capabilities
instances.
The following removed constants
\TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ BROWSABLE \TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ PUBLIC \TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ WRITABLE \TYPO3\
CMS\ Core\ Resource\ Resource Storage Interface:: CAPABILITY_ HIERARCHICAL_ IDENTIFIERS
can be replaced with public constants of the new Capabilities
class:
\TYPO3\
CMS\ Core\ Resource\ Capabilities:: CAPABILITY_ BROWSABLE \TYPO3\
CMS\ Core\ Resource\ Capabilities:: CAPABILITY_ PUBLIC \TYPO3\
CMS\ Core\ Resource\ Capabilities:: CAPABILITY_ WRITABLE \TYPO3\
CMS\ Core\ Resource\ Capabilities:: CAPABILITY_ HIERARCHICAL_ IDENTIFIERS