Deprecation: #109107 - CacheAction key "href" 

See forge#109107

Description 

The CacheAction array key href used in cache action definitions provided via the ModifyClearCacheActionsEvent has been deprecated in favor of endpoint. The new key name better reflects the purpose of this field, which is used as an AJAX endpoint URL. The value must be a string.

Impact 

Cache action arrays that contain an href key but no endpoint key will trigger a PHP E_USER_DEPRECATED notice. The ClearCacheToolbarItem will automatically migrate href to endpoint at runtime to maintain backward compatibility.

Support for the href key will be removed in TYPO3 v15.0.

Affected installations 

Any installation using extensions that register custom cache actions via ModifyClearCacheActionsEvent and provide the action URL under the href array key.

Migration 

Replace the href key with endpoint in any cache action array returned from a ModifyClearCacheActionsEvent listener.

// Before (deprecated)
$event->addCacheAction([
    'id' => 'my_custom_cache',
    'href' => $uriBuilder->buildUriFromRoute('ajax_my_cache_clear'),
    'iconIdentifier' => 'actions-system-cache-clear',
    'title' => 'Clear my cache',
    'description' => 'Optional description',
    'severity' => 'notice',
]);

// After
$event->addCacheAction([
    'id' => 'my_custom_cache',
    'endpoint' => (string)$uriBuilder->buildUriFromRoute('ajax_my_cache_clear'),
    'iconIdentifier' => 'actions-system-cache-clear',
    'title' => 'Clear my cache',
    'description' => 'Optional description',
    'severity' => 'notice',
]);
Copied!