silverbackis/api-components-bundle
A Symfony bundle for building clean JSON APIs with reusable components. It adds conventions and helpers for API resources, request handling, serialization, validation, pagination, and error responses, reducing boilerplate while keeping controllers thin and responses consistent.
422 on component; assigning a group owner from inside it is a 422 on components. Previously a cycle already in the database could make ComponentVoter recurse indefinitely. For the PM this is a reliability decision, not a feature: it removes an unbounded-failure mode (authorization timeouts / 500s) and converts it into a predictable validation error.component and components mean client apps and editors need to render those 422s. This is a small, well-bounded front-end/contract task — worth ticketing explicitly so it isn't discovered in QA.ApiTestCase (in-memory SQLite per process, debug-kernel group, Risky-failing configs, Infection coverage, single Codecov upload). If any internal test conventions or golden scaffolds were forked from features/, that path moved to tests/Functional/assets and tests/Functional/Fixture/scaffolds.Consider adopting when:
ComponentVoter) over that graph rather than duplicating the rules in each client.Look elsewhere when:
symfony/yaml / symfony/translation are now direct dev dependencies).features/ layout — that is a breaking change for anyone extending or forking the suite.Migration notes for the adopting team: expect to rewrite any Behat-based tests into PHPUnit functional tests, re-point asset and fixture paths, and re-baseline CI (one coverage upload). The cycle-prevention change is a behavioural tightening — re-run existing fixtures; data that previously slipped through will now fail with 422, and any pre-existing cycles in a database need a one-off cleanup because the voter no longer recurses but the bad data still exists.
To executives (one paragraph): We're evaluating a PHP component-tree package that supplies publishing-state component composition and server-side integrity checks. This release is notable for two reasons: it eliminates a data-corruption and infinite-recursion failure mode at the API boundary — the kind of defect that surfaces as outages and manual data repair — and it clears a platform-upgrade blocker by supporting Symfony 8.1. It remains an alpha, so the recommendation is a time-boxed pilot behind an adapter with a pinned version, not a delivery commitment. Upside: avoided custom validation and domain work. Downside risk: alpha churn and upgrade effort, both bounded by the adapter.
To engineering: The security-relevant fix is the cycle guard — component-in-own-subtree is now a 422 on component, owner-from-inside-group is a 422 on components, and ComponentVoter terminates instead of recursing on legacy bad rows. Tooling is consolidated: Behat is gone, every feature is a PHPUnit functional test on ApiTestCase with in-memory SQLite and a debug-kernel group; both PHPUnit configs fail on Risky and the functional suite runs on every Behat CI leg and in Infection. Symfony 8.1 resolves on 8.1 legs; symfony/yaml and symfony/translation are direct dev dependencies. Expect to migrate forked Behat suites and the moved tests/Functional/assets / tests/Functional/Fixture/scaffolds paths, and to handle the two new 422 responses in client error states.
Recommendation: Pilot. Adopt in a non-critical path, pin 2.0.0-alpha.30, isolate behind an interface so a swap or a Laravel-native rebuild stays cheap, and reassess at the first stable 2.0.0.
How can I help you explore Laravel packages today?