Skip to content

GH-81: Add CONTRIBUTING and a support policy, fix three doc inaccuracies - #133

Merged
magicsunday merged 1 commit into
mainfrom
GH-81
Jul 21, 2026
Merged

GH-81: Add CONTRIBUTING and a support policy, fix three doc inaccuracies#133
magicsunday merged 1 commit into
mainfrom
GH-81

Conversation

@magicsunday

Copy link
Copy Markdown
Owner

Overview

Closes #81. Consumer-facing documentation gaps, plus one adjacent inaccuracy a review found.

Changes

  • Dead link fixed. The README linked a CONTRIBUTING.md that did not exist. A repository CONTRIBUTING.md now covers the repo-specific workflow (setup, the ci:test gate, the coverage gate, branch/commit conventions) and defers to the org guide for general policy and to AGENTS.md for agent rules — no duplication. Every relative link in README/CONTRIBUTING was checked to resolve.
  • BC / support policy added. A README section: releases follow SemVer, what the public surface is (and that Value\Strategy\* is @internal and outside it), and that 3.x is the current development line requiring PHP ^8.3, verified against 8.3/8.4/8.5. The wording states what 3.x is rather than asserting anything about earlier majors (CI still targets *.x).
  • docs/API.md namespace claim corrected — the entry-point class is MagicSunday\JsonMapper (namespace MagicSunday), not under MagicSunday\JsonMapper\….
  • docs/recipes/type-converters.md resolver example now takes mixed $payload (matching Closure(mixed)) and reads the discriminator from a stdClass or an array, so it works under the recommended json_decode(..., associative: false).
  • docs/API.md addCustomClassMapEntry signature corrected from Closure $resolver to Closure|string $resolver.

Verification

Docs only, no code change. composer ci:test green (505 tests) — the Docs*Test doc-verification suite still passes. Fact-checked by Codex against the real sources; its findings (the SemVer/earlier-majors wording and the Closure|string signature) are folded in.

🤖 Generated with Claude Code

Consumer-facing documentation gaps the issue lists, plus one adjacent inaccuracy
in the same file.

The README linked a CONTRIBUTING.md that did not exist. A repository CONTRIBUTING
now covers the repo-specific workflow - setup, the ci:test gate, the coverage
gate, the branch/commit conventions - and defers to the organisation guide for
general policy and to AGENTS.md for agent rules, so it does not duplicate either.
Every README and CONTRIBUTING relative link was checked to resolve.

There was no backward-compatibility or support statement for consumers. The
README gains a section: releases follow SemVer, what the public surface is (and
that the Value\Strategy\* classes are @internal and outside it), and that 3.x is
the current development line requiring PHP ^8.3 and verified against 8.3/8.4/8.5.
The support wording is deliberately grounded - it states what 3.x is rather than
asserting anything about earlier majors, since CI still targets *.x branches.

docs/API.md claimed "all classes are namespaced under MagicSunday\JsonMapper",
false for the entry-point class itself (MagicSunday\JsonMapper, in the
MagicSunday namespace). Reworded to name the entry point separately.

docs/recipes/type-converters.md typed a class-map resolver as array $payload and
read $payload['type'], but the documented interface is Closure(mixed) and the
recipe recommends json_decode(..., associative: false), under which the fragment
is a stdClass and the array access fails. The example now takes mixed and reads
the discriminator from either shape.

And an adjacent inaccuracy a review found: docs/API.md documented
addCustomClassMapEntry's resolver parameter as Closure, but it is Closure|string
(a concrete class-string maps unconditionally). Corrected, with the pipe escaped
for the Markdown table.

Docs only; no code change. Verified: composer ci:test green (505 tests), so the
Docs*Test doc-verification suite still passes.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@magicsunday

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@magicsunday
magicsunday merged commit 27cc3dc into main Jul 21, 2026
17 checks passed
@magicsunday
magicsunday deleted the GH-81 branch July 21, 2026 17:37
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.

README links a missing CONTRIBUTING.md and there is no BC/support policy

1 participant