Skip to content

Roadmap: add 'Beyond v3.x' strategic directions#21

Merged
mmucklo merged 1 commit into
roadmap-locale-designfrom
roadmap-beyond-v3
Apr 16, 2026
Merged

Roadmap: add 'Beyond v3.x' strategic directions#21
mmucklo merged 1 commit into
roadmap-locale-designfrom
roadmap-beyond-v3

Conversation

@mmucklo

@mmucklo mmucklo commented Apr 14, 2026

Copy link
Copy Markdown
Owner

Stacked on #20. Captures the design space past the Path B package split so future decisions sit against an explicit menu rather than getting invented ad hoc.

Four themes, ranked by identity impact

  • §9 CLDR plural categories — lifts the English-binary assumption by delegating category resolution (`zero`/`one`/`two`/`few`/`many`/`other`) to `ext-intl` + Unicode CLDR. Scoped (one new method, existing locales extended). Doesn't change product identity.
  • §10 Morphology expansion — verb conjugation, indefinite articles, ordinals, case/gender. Scope creep; would change what this library is.
  • §11 Locale data quality — test corpora from Wiktionary / UniMorph with CI accuracy metrics; optional ML fallback via ONNX + FFI in an opt-in `mmucklo/inflect-neural` package.
  • §12 Ecosystem — Symfony / Laravel bridges, composer-plugin locale discovery, benchmark-as-identity against Doctrine Inflector and Symfony String.

Headline recommendation (documented inline)

If exactly one theme: §9. Scoped, standards-backed, doesn't change the product's identity but lifts its ceiling from "English-ish" to "genuinely multilingual."

Framing

Explicitly captured as "not commitments — captured here so the decision space is explicit when we get there." Future us reads one document and knows the options.

Test plan

  • Confirm the four-theme breakdown captures the right axes (identity / locale-depth / data-quality / adoption).
  • Confirm §9 headline recommendation stands.

🤖 Generated with Claude Code

Captures the design space past the Path B package split so future
decisions sit against an explicit menu rather than getting invented
ad hoc:

- §9 CLDR plural categories — lifts the English-binary assumption,
  rides on ext-intl / Unicode CLDR. One new method, locales delegate
  category resolution to MessageFormatter/NumberFormatter.
- §10 Morphology expansion — verb conjugation, indefinite articles,
  ordinals, case/gender. Scope creep; would change the product's
  identity.
- §11 Locale data quality — test corpora (Wiktionary/UniMorph) with
  CI accuracy metrics; optional ML fallback via ONNX/FFI.
- §12 Ecosystem — Symfony/Laravel bridges, composer-plugin locale
  discovery, benchmark-as-identity against Doctrine/Symfony.

Headline recommendation: §9 if we pick one — scoped, ext-intl-based,
doesn't change the library's identity but makes the current product
genuinely multilingual.

Explicitly framed as "not commitments — captured so the decision
space is explicit when we get there."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.07%. Comparing base (966da72) to head (3d3dd96).
⚠️ Report is 1 commits behind head on roadmap-locale-design.

Additional details and impacted files
@@                   Coverage Diff                    @@
##             roadmap-locale-design      #21   +/-   ##
========================================================
  Coverage                    98.07%   98.07%           
  Complexity                      27       27           
========================================================
  Files                            1        1           
  Lines                           52       52           
========================================================
  Hits                            51       51           
  Misses                           1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mmucklo mmucklo merged commit b1da2ae into roadmap-locale-design Apr 16, 2026
6 checks passed
@mmucklo mmucklo deleted the roadmap-beyond-v3 branch April 16, 2026 05:51
mmucklo added a commit that referenced this pull request Apr 16, 2026
* Roadmap: lock §5a locale design; reflect shipped §6/§7/§8 work

Convert the §5a "Open design questions" into resolved decisions so
implementation can start without a round-trip:

- Locale is an abstract class holding rule tables as protected
  instance state, with a concrete regex-rule engine shared across
  subclasses. Bare Locale interface deferred to a later revision if
  needed for exotic morphologies.
- Rule-table visibility: protected (not private — subclasses seed
  them; not public — we moved away from mutable shared state in 2.0).
  Defaults come from protected const class constants on subclasses.
- Caching: per-instance, not global. Extension methods mutate
  instance state and invalidate the instance cache.
- Default locale: the static API always uses En. No global
  setDefaultLocale — avoids action-at-a-distance.
- Instance API: new Inflect(Locale|string $locale = 'en').
  Inflect::registerLocale(name, LocaleOrClassString) for third
  parties. Resolution is lazy.
- Back-compat: static methods keep signatures; internally delegate
  to a lazily-initialized shared En instance. Proxy extension
  methods mutate that shared instance.

Also reflect ship state:
- §6 docs: largely shipped in #19.
- §7 tooling: phpstan + cs-fixer shipped in #18; infection/phpbench
  deferred.
- §8: v2.0.0 tagged 2026-04-13.
- Phasing: v2.1 now merges items 5 + 5a (they share the same API
  surface); v2.2 becomes "add a non-English locale"; v3.x remains
  the conditional Path B split.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Roadmap: add "Beyond v3.x" section with four strategic directions (#21)

Captures the design space past the Path B package split so future
decisions sit against an explicit menu rather than getting invented
ad hoc:

- §9 CLDR plural categories — lifts the English-binary assumption,
  rides on ext-intl / Unicode CLDR. One new method, locales delegate
  category resolution to MessageFormatter/NumberFormatter.
- §10 Morphology expansion — verb conjugation, indefinite articles,
  ordinals, case/gender. Scope creep; would change the product's
  identity.
- §11 Locale data quality — test corpora (Wiktionary/UniMorph) with
  CI accuracy metrics; optional ML fallback via ONNX/FFI.
- §12 Ecosystem — Symfony/Laravel bridges, composer-plugin locale
  discovery, benchmark-as-identity against Doctrine/Symfony.

Headline recommendation: §9 if we pick one — scoped, ext-intl-based,
doesn't change the library's identity but makes the current product
genuinely multilingual.

Explicitly framed as "not commitments — captured so the decision
space is explicit when we get there."

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <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