Docs: expand README, add Keep-a-Changelog CHANGELOG.md and CONTRIBUTING.md (roadmap §6)#19
Merged
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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>
3 tasks
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>
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.
Addresses ROADMAP §6.
README
CHANGELOG.md (Keep-a-Changelog)
CONTRIBUTING.md
Test plan
🤖 Generated with Claude Code