Skip to content

Preserve mixed tokens when detecting combined initials - #17

Merged
iliaal merged 1 commit into
masterfrom
fix/preserve-noninitial-combined-tokens
Oct 11, 2026
Merged

iliaal merged 1 commit into
masterfrom
fix/preserve-noninitial-combined-tokens

Conversation

@iliaal

@iliaal iliaal commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Require every grapheme in a candidate combined-initial token to satisfy the existing initial predicate before expanding it.
  • Preserve digits, punctuation, and caseless characters inside their original token. For example, Smith, A1 John now retains first name A1 instead of promoting 1 to the first name and exporting A as an initial.
  • Keep plain, dotted, and decomposed-letter initials working and retain the existing expansion ceiling.
  • Add isolated mapper/parser regressions and an Unreleased changelog entry.

Verification

  • PHP 8.4.24: full PHPUnit suite passes, 1,220 tests / 3,156 assertions (also independently repeated during review).
  • Regression file: 10 tests / 21 assertions; nine cases fail on the original code.
  • PHPStan level 9 and PHP 8.5 configuration pass with --memory-limit=512M (the local 128 MB default was insufficient).
  • PHP-CS-Fixer dry run, empty-baseline guard, PHP 8.5 deprecation guard, README check, and git diff --check pass.
  • Full remote tree contents and modes match the tested local tree 8e75a8d0ecad1d5e2263e9af63b80231dfebac91 before opening this PR.
  • Local runtime is PHP 8.4 only; the CI matrix covers PHP 8.3, 8.4, and 8.5.

No dependencies, workflows, or public signatures changed.

@iliaal
iliaal merged commit bf4384e into master Oct 11, 2026
5 checks passed
@iliaal
iliaal deleted the fix/preserve-noninitial-combined-tokens branch October 11, 2026 07:55
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