Deprecation: #109107 - CacheAction key "href"
See forge#109107
Description
The
Cache array key
href
used in cache action definitions
provided by the
\TYPO3\ 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
rather than an
endpoint
key
will trigger a PHP
E_ notice.
\TYPO3\ 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 that has extensions which register custom cache actions with
Modify and
provide an action URL in the
href
array key.
Migration
Replace the
href
key with
endpoint
in any cache action array
returned from a
Modify listener.
$event->addCacheAction([
'id' => 'my_custom_cache',
- 'href' => $uriBuilder->buildUriFromRoute('ajax_my_cache_clear'),
+ 'endpoint' => (string)$uriBuilder->buildUriFromRoute('ajax_my_cache_clear'),
'iconIdentifier' => 'actions-system-cache-clear',
'title' => 'Clear my cache',
'description' => 'Optional description',
'severity' => 'notice',
]);