Deprecation: #108761 - BackendUtility TSconfig-related methods
See forge#108761
Description
The following methods in
\TYPO3\ have
been deprecated:
getTCEFORM_ TSconfig () getTSCpid Cached () getTSCpid ()
A new method
Backend has been introduced that
returns the real page ID for a given record. Unlike the previous methods that
returned arrays with multiple values or used internal caching, this method
provides a cleaner API that returns either the page ID as an integer or
null if the page cannot be determined.
Impact
Calling any of the deprecated methods will trigger a deprecation-level log entry. The methods will be removed in TYPO3 v15.0.
The extension scanner reports usages as a strong match.
Affected installations
Instances or extensions that directly call any of the deprecated methods are affected.
Migration
getTCEFORM_TSconfig()
This method has been moved to
Form. If you need TSconfig
for TCEFORM, it is recommended to rely on FormEngine data providers instead.
getTSCpidCached() and getTSCpid()
These methods returned an array with two values: the TSconfig PID and the
real PID. The new
get method returns only the real page ID.
Before
// getTSCpidCached returned [$tscPid, $realPid]
[$tscPid, $realPid] = BackendUtility::getTSCpidCached($table, $uid, $pid);
// getTSCpid returned the same structure
[$tscPid, $realPid] = BackendUtility::getTSCpid($table, $uid, $pid);
After
// getRealPageId() returns int|null
$pageId = BackendUtility::getRealPageId($table, $uid, $pid);
// If you need to ensure an integer (null becomes 0)
$pageId = (int)BackendUtility::getRealPageId($table, $uid, $pid);