feat(#3608361): pass field delta in token data for [file:delta] support
The [file:delta] token was added to the Field Tokens module in #2386655, but File (Field) Paths iterates files via referencedEntities() which discards the field delta, so the token resolves to empty.
This patch switches the loop in FileFieldPathsProcessFileLegacy to iterate field items directly, exposing each item's delta. It passes 'delta' => $delta in the token data so that [file:delta] resolves correctly in filename and path patterns:
[node:title]-[file:delta].[file:ffp-extension-original]Changes:
- Replace
referencedEntities()loop with direct field item iteration - Add
FileInterfaceinstanceof guard for null/non-file items - Pass
'delta'in token data - Functional test: multi-value file upload with
[file:delta]pattern - Kernel test: null entity guard coverage
Tested on Drupal 10 and 11. All CI checks passing.