Skip to content

Docs: expand README, add Keep-a-Changelog CHANGELOG.md and CONTRIBUTING.md (roadmap §6)#19

Merged
mmucklo merged 1 commit into
masterfrom
docs-readme-changelog-contributing
Apr 13, 2026
Merged

Docs: expand README, add Keep-a-Changelog CHANGELOG.md and CONTRIBUTING.md (roadmap §6)#19
mmucklo merged 1 commit into
masterfrom
docs-readme-changelog-contributing

Conversation

@mmucklo

@mmucklo mmucklo commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Addresses ROADMAP §6.

README

  • Installation via `composer require mmucklo/inflect`.
  • Full API surface (`pluralize`, `singularize`, `pluralizeIf`) with examples for irregulars, uncountables, case preservation, and the double-inflection guard.
  • Requirements, versioning, upgrade note for 1.x → 2.0.0, credits, license.
  • Added Packagist version + license badges alongside the existing CI / Codecov / Scrutinizer badges.

CHANGELOG.md (Keep-a-Changelog)

  • `Unreleased` section tracking docs + roadmap §7 tooling.
  • `2.0.0` release with Breaking / Added / Changed / Removed subsections, sourced from the v2.0.0 release notes and linked to each PR.
  • Pre-2.0 history preserved as a narrative summary seeded from the freeform `CHANGELOG` file, which is removed.

CONTRIBUTING.md

  • Dev setup (`composer install`).
  • Running the quality suite (phpunit / phpstan / php-cs-fixer) locally — all four gates must pass.
  • Branch conventions (`master` vs `php5.3`, PR-only workflow).
  • Commit-message guidance (why, not just what).
  • Notes on adding inflection rules (check suffix safety, test both directions — e.g. why we rejected `die/dice` from $irregular).

Test plan

  • Zero code changes; tests / phpstan / cs-fixer unchanged.
  • Render check on GitHub for all three docs.
  • Confirm the CHANGELOG PR links resolve.

🤖 Generated with Claude Code

…NG.md

Roadmap §6.

README:
- Installation via composer require.
- Full API surface (pluralize, singularize, pluralizeIf) with
  examples for irregulars, uncountables, case preservation, and the
  double-inflection guard.
- Requirements, versioning, upgrade note for 1.x → 2.0.0, credits,
  and license pointer.
- Additional Packagist version + license badges alongside existing
  CI / Codecov / Scrutinizer badges.

CHANGELOG.md (Keep-a-Changelog):
- Unreleased section (docs + roadmap §7 tooling).
- 2.0.0 with breaking / added / changed / removed subsections,
  sourced from the v2.0.0 release notes and linked to the PRs.
- Pre-2.0 history preserved as a narrative summary seeded from the
  freeform CHANGELOG file, which is removed.

CONTRIBUTING.md:
- Dev setup, running phpunit / phpstan / php-cs-fixer.
- Branch conventions (master vs php5.3, PR-only workflow).
- Commit-message guidance.
- Notes on writing inflection rules (check suffix safety, test both
  directions).

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

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.07%. Comparing base (307b3ff) to head (d582917).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #19   +/-   ##
=========================================
  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 00188a4 into master Apr 13, 2026
7 checks passed
@mmucklo mmucklo deleted the docs-readme-changelog-contributing branch April 13, 2026 08:36
mmucklo added a commit that referenced this pull request Apr 13, 2026
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>
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