Skip to content

Support coalesce/concat resolution strategies for synchronizeColumns - #375

Merged
sfroemkenjw merged 3 commits into
mainfrom
feature/synchronize-columns-coalesce-concat
Aug 19, 2026
Merged

sfroemkenjw merged 3 commits into
mainfrom
feature/synchronize-columns-coalesce-concat

Conversation

@sfroemkenjw

Copy link
Copy Markdown
Contributor

Summary

  • foreignColumnName of synchronizeColumns previously only accepted a single, hard-coded column name of the foreign table. This adds a ForeignColumn value object that resolves it as a composite: a plain string still works unchanged, while an array with type coalesce/concat (or a bare list, treated as an implicit coalesce) can combine and nest arbitrarily to any depth.
  • Fixes a latent bug in CreateMaps2RecordHook::synchronizeColumnsFromForeignRecordWithPoiCollection() where the SynchronizeColumn object was accessed via array offset ($synchronizeColumns['foreignColumnName']) instead of its getters — would have thrown a fatal error on any real synchronization.
  • Documents the new syntax (coalesce, concat, nesting, shorthand list, and the value-resolution rules around trimming/empty handling) in Documentation/DeveloperManual/Maps2Registry/Index.rst.
  • Bumps version to 13.1.0 (composer.json, ext_emconf.php, Documentation/guides.xml) with a ChangeLog entry.

Test plan

  • New unit tests in 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).
  • New functional test synchronizeColumnsFromForeignRecordWithPoiCollectionResolvesComposedForeignColumn in Tests/Functional/Hook/CreateMaps2RecordHookTest.php, exercising real TCA-driven parsing end-to-end into the database.
  • Manually verified the exact real-world configuration (coalesce over company/name, falling back to concat(first_name, last_name)) via a standalone script against ForeignColumn directly.

🤖 Generated with Claude Code

sfroemkenjw and others added 3 commits August 19, 2026 14:14
…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>
@sfroemkenjw
sfroemkenjw merged commit 260126c into main Aug 19, 2026
6 checks passed
@sfroemkenjw
sfroemkenjw deleted the feature/synchronize-columns-coalesce-concat branch August 19, 2026 12:27
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant