Product Decisions This Supports
- Build vs. buy for code and fixture generation. This package turns a declarative description of a shape into PHP source — parameter lists, method signatures, DTO/config classes. The decision it informs is whether to hand-write and hand-maintain that boilerplate or generate it. This is a tooling decision — the artifact is ordinary PHP committed to your repo — not a runtime architecture commitment.
- Roadmap impact of v2.1.1: none. The release is a single patch that stops serializing during the flattening pass and defers serialization to its own later step. No public API change, no feature, no deprecation. Do not allocate roadmap capacity beyond a routine dependency bump and a regeneration check.
- An output-correctness item worth tracking, not re-planning. The fix implies build → flatten → serialize is an ordered pipeline, and earlier versions could serialize before flattening completed. Any product surface that depends on the serialized form of nested/flattened structures (API payload fixtures, config exports, schema snapshots) may have silently differed. Treat as verify-and-close.
- Use cases to evaluate against: generated request/query parameter objects for internal API clients, typed config and form schema classes, test fixtures and data-provider parameter sets, and internal SDK-shaped DTOs. Poor fit where the generated classes are a public, versioned contract with external consumers.
- Reverse-ability is the property that makes this a safe bet. Because the output is checked-in PHP, the exit cost is "regenerate once, delete the dev dependency." That keeps it low-blast-radius — suitable for a spike, an internal tool, or a backlog item that needs no architecture review.
When to Consider This Package
Consider adoption when:
- You maintain near-identical PHP classes, fixtures, or parameter sets by hand across more than one place, and the shape is describable declaratively.
- The package is confined to a dev dependency and runs at build/codegen or test time — never on a production request path.
- You can commit the generated output and diff it in CI, so regeneration is reviewable and the dependency stays removable.
- The pipeline model (build → flatten → serialize) matches your intent: flattening is a structural transform, serialization is a deliberate final step. v2.1.1 makes that separation correct; if anything relied on the old interleaved behavior, that reliance was incidental rather than contractual.
- You need a short-lived capability — a spike, a migration helper, a one-off scaffolding job — where the cost of a small unmaintained tool is clearly below the cost of writing it yourself.
Look elsewhere when:
- You need a supported vendor relationship. This is a small, effectively single-maintainer project with no SLA, no security-response commitment, and a last release in mid-2022. Acceptable for dev tooling; unacceptable for anything on the critical path.
- You need a guaranteed output-stability contract for generated code. A patch that reorders an internal pipeline is exactly the kind of change that can shift output for edge-case inputs. If downstream consumers pin to exact bytes, you want a project with explicit stability guarantees and changelogs that enumerate output diffs.
- It's a one-time job. Generate, commit, drop the dependency. Don't carry a dependency you will use once.
- Your PHP matrix is broad or unusual. Small projects test narrowly — validate against the PHP version you standardize on, especially around union/intersection types, enums, readonly properties, and promoted constructor params, which reflection-based generators are sensitive to.
- Compliance or provenance requirements apply. If your process requires SBOM attestation or maintainer due diligence, the recurring review cost will exceed the value here.
How to Pitch It (Stakeholders)
For executives (one paragraph): This is a small, low-cost code-generation utility that removes hand-maintained PHP boilerplate. It is a build-time tool that does not ship in the product, and the classes it produces are committed to our repository — so if the project is ever abandoned, we regenerate once and walk away. The material risk is maintenance and bus factor, not lock-in, and the exit cost is roughly a day of engineering. The v2.1.1 release is a correctness patch with no feature or interface change: it requires a routine upgrade and a check that our generated output is unchanged, and it needs no roadmap decision.
For engineering (summary): v2.1.1 is a semver patch containing one change — serialization is no longer performed during the flattening pass and is deferred to its own later step. Treat it as a pipeline-ordering correction. No breaking changes, no new features, no deprecations. Adopt it as a require-dev dependency pinned to an explicit constraint (^2.1.1), wrap it in a thin helper so a future major version or a swap-out is a one-file change, and keep it out of require and off any request path.
Recommended handling:
- Bump the dev dependency and regenerate. Keep the regenerated output in its own commit so the diff is isolated and reviewable.
- If you hold snapshot or golden-file tests over serialized output, those are the acceptance criterion — not the changelog. A clean diff is the expected result; any diff means prior behavior was order-dependent and deserves a look before merge.
- Where the package is pinned in a lockfile used by CI codegen jobs, confirm the version resolves and regeneration is deterministic across machines (stable key ordering, no timestamps in output).
- No action for production runtimes; this should never be a runtime dependency.
- Track as an open question for the maintainer: what concrete defect PR #9 fixed, and whether v2.1.1 changes any observable generated output versus 2.1.0. The release note is one line and does not say — plan for the answer to be "subtly yes."
Rationale for the low effort estimate: a single-line changelog touching internal sequencing, on a project at 2.x, with generated artifacts held in-repo. The only scenario that escalates this is discovering we depended on the pre-fix interleaved behavior — a small, contained fix to our own serialization expectations, not a re-architecture.