Repository navigation
Support coalesce/concat resolution strategies for synchronizeColumns - #375
Merged
Merged
Conversation
…mnName foreignColumnName previously only accepted a single, hard-coded column name, which made it impossible to synchronize a value that may live in one of several columns (e.g. company vs. name) or that has to be combined from multiple columns (e.g. first_name + last_name). The new ForeignColumn value object resolves foreignColumnName as a composite: a plain string still works as before, while an array with type coalesce/concat (or a bare list, treated as an implicit coalesce) can combine and nest arbitrarily. Also fixes a latent bug in CreateMaps2RecordHook where the SynchronizeColumn object was accessed via array offset instead of its getters. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Minor release for the new synchronizeColumns foreignColumnName coalesce/concat resolution feature. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks done
sfroemkenjw
added a commit
that referenced
this pull request
Aug 19, 2026
…zeColumns (#376) Backport of the foreignColumnName coalesce/concat resolution feature from main (#375) to TYPO3 13. foreignColumnName previously only accepted a single, hard-coded column name, which made it impossible to synchronize a value that may live in one of several columns (e.g. company vs. name) or that has to be combined from multiple columns (e.g. first_name + last_name). The new ForeignColumn value object resolves foreignColumnName as a composite: a plain string still works as before, while an array with type coalesce/concat (or a bare list, treated as an implicit coalesce) can combine and nest arbitrarily. The static Maps2Registry::getInstance()->add() registration API and its JSON-backed registry are intentionally kept as-is; only the interpretation of the `synchronizeColumns[].foreignColumnName` option changed. The TcaSchemaFactory-based registry rewrite and TCA-embedded registration from main's TYPO3 14 line are out of scope for this branch. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
foreignColumnNameofsynchronizeColumnspreviously only accepted a single, hard-coded column name of the foreign table. This adds aForeignColumnvalue object that resolves it as a composite: a plain string still works unchanged, while an array withtypecoalesce/concat(or a bare list, treated as an implicitcoalesce) can combine and nest arbitrarily to any depth.CreateMaps2RecordHook::synchronizeColumnsFromForeignRecordWithPoiCollection()where theSynchronizeColumnobject was accessed via array offset ($synchronizeColumns['foreignColumnName']) instead of its getters — would have thrown a fatal error on any real synchronization.coalesce,concat, nesting, shorthand list, and the value-resolution rules around trimming/empty handling) inDocumentation/DeveloperManual/Maps2Registry/Index.rst.Test plan
Tests/Unit/Tca/ForeignColumnTest.php(string/array parsing, coalesce, concat, arbitrary nesting, whitespace/empty-value handling, comma-glue edge cases) — run via the extension's own test setup (not runnable from this checkout, no PHPUnit installed here).synchronizeColumnsFromForeignRecordWithPoiCollectionResolvesComposedForeignColumninTests/Functional/Hook/CreateMaps2RecordHookTest.php, exercising real TCA-driven parsing end-to-end into the database.ForeignColumndirectly.🤖 Generated with Claude Code