You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
==================================================================
Breaking: #101309 - Introduce type declarations in DriverInterface
See :issue:101309
Description
Return and param type declarations have been introduced for all methods stubs
of :php:\TYPO3\CMS\Core\Resource\Driver\DriverInterface.
Also, method :php:\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::sanitizeFileName()
has been removed.
Impact
In consequence, all implementations of :php:\TYPO3\CMS\Core\Resource\Driver\DriverInterface need
to reflect those changes and add the same return and param type declarations.
In case, any of the core implementations are extended, overridden methods might need to be adjusted.
The core classes, implementing :php:\TYPO3\CMS\Core\Resource\DriverInterface are:
Said method didn't sanitize at all, it didn't respect the given :php:$charset param and simply
returned the input string. Abstract classes MAY fulfill the interface contract but if they do so,
they MUST do it right. There is no benefit in fulfilling it just signature wise, it MUST fulfill
it functional wise and in this case it didn't. That's why :php:LocalDriver
reimplements :php:sanitizeFileName() completely.
As a consequence of this removal, all classes that extend either
:php:\TYPO3\CMS\Core\Resource\Driver\AbstractDriver or
:php:\TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver, need to
implement method :php:sanitizeFileName().
Affected installations
All installations that implement :php:\TYPO3\CMS\Core\Resource\DriverInterface or that
extend either :php:\TYPO3\CMS\Core\Resource\Driver\AbstractDriver or
:php:\TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver.
Migration
As for the type declarations:
Add the same param and return type declarations the interface does.
As for the removed method :php:\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::sanitizeFileName():
Implement the method according to your driver capabilities.
.. index:: FAL, PHP-API, NotScanned, ext:core
The text was updated successfully, but these errors were encountered:
Breaking: #101309 - Introduce type declarations in DriverInterface
https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/13.0/Breaking-101309-IntroduceTypeDeclarationsInDriverInterface.html
.. include:: /Includes.rst.txt
.. _breaking-101309-1689061837:
==================================================================
Breaking: #101309 - Introduce type declarations in DriverInterface
See :issue:
101309
Description
Return and param type declarations have been introduced for all methods stubs
of :php:
\TYPO3\CMS\Core\Resource\Driver\DriverInterface
.Also, method :php:
\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::sanitizeFileName()
has been removed.
Impact
In consequence, all implementations of :php:
\TYPO3\CMS\Core\Resource\Driver\DriverInterface
needto reflect those changes and add the same return and param type declarations.
In case, any of the core implementations are extended, overridden methods might need to be adjusted.
The core classes, implementing :php:
\TYPO3\CMS\Core\Resource\DriverInterface
are:\TYPO3\CMS\Core\Resource\Driver\AbstractDriver
\TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver
\TYPO3\CMS\Core\Resource\Driver\LocalDriver
Concerning removed method :php:
\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::sanitizeFileName()
:Said method didn't sanitize at all, it didn't respect the given :php:
$charset
param and simplyreturned the input string. Abstract classes MAY fulfill the interface contract but if they do so,
they MUST do it right. There is no benefit in fulfilling it just signature wise, it MUST fulfill
it functional wise and in this case it didn't. That's why :php:
LocalDriver
reimplements :php:
sanitizeFileName()
completely.As a consequence of this removal, all classes that extend either
:php:
\TYPO3\CMS\Core\Resource\Driver\AbstractDriver
or:php:
\TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver
, need toimplement method :php:
sanitizeFileName()
.Affected installations
All installations that implement :php:
\TYPO3\CMS\Core\Resource\DriverInterface
or thatextend either :php:
\TYPO3\CMS\Core\Resource\Driver\AbstractDriver
or:php:
\TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver
.Migration
As for the type declarations:
Add the same param and return type declarations the interface does.
As for the removed method :php:
\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::sanitizeFileName()
:Implement the method according to your driver capabilities.
.. index:: FAL, PHP-API, NotScanned, ext:core
The text was updated successfully, but these errors were encountered: