silverbackis/api-component-bundle
A Symfony bundle for building modular JSON APIs with reusable components. It helps organize endpoints, handle requests and responses, and keep API code clean, testable, and easy to extend across your application.
Architecture fit. First, a scoping correction: this package (components-web-app/api-components-bundle) is a Symfony bundle built on API Platform, not a Laravel package. It is a domain/API layer for a component/group hierarchy with draft-vs-published semantics and a ComponentVoter authorization layer. If our target stack is Laravel, this is not a drop-in fit — integration would require either standing up a separate Symfony service behind HTTP or a significant adapter effort. If our stack is Symfony + API Platform (PHP 8.x, Symfony 7.4/8.1), the architecture is a clean fit: the bundle owns the entity graph and validation, and exposes HTTP semantics we can consume.
Integration feasibility. Installable via Composer as a bundle; runtime surface is unchanged in this release — every change is either a validation fix or test-infrastructure work. That makes the code change low-risk to adopt, but the version carries the real feasibility question: 2.0.0-alpha.30 is the thirtieth alpha of a major version, which signals a long, still-open stabilization window and no compatibility promise. Any adoption must be a pinned, deliberate decision, not a floating constraint.
Technical risk.
component, and assigning a group owner from inside the group returns 422 on components. Any client that previously relied on silent acceptance (or on a 500) must handle field-scoped 422s.ComponentVoter previously recursed forever on a cycle already present in the database. The fix prevents the crash but does not clean that data. A cycle in production is a latent outage that will now surface as a 403/denial rather than a hang — better, but it must be found and repaired deliberately.ApiTestCase migration, SQLite-per-process, failOnRisky, Infection, and the features/ → tests/Functional/{assets,Fixture/scaffolds} move are all internal. They touch us only if we consume the bundle's feature files or scaffold fixtures, or if we contribute upstream.composer.json runtime constraints before planning our Symfony upgrade path around it.Key questions.
require constraints for Symfony and PHP in this tag, versus what the 8.1 dev resolution implies?tests/Functional/Fixture/scaffolds assets referenced by any downstream tooling, or purely internal?Stack fit. Adopt only on a Symfony + API Platform service. Confirm the runtime Symfony range (7.4 vs 8.1) and PHP floor before committing; the release notes prove the test suite runs on 8.1 but say nothing binding about runtime. If our product surface is Laravel, treat this as an external service dependency with an HTTP contract, not an embedded package.
Migration path. Treat this as a data-first migration, not a code-first one:
ComponentVoter fix does not convert a hang into an unexplained authorization denial on live traffic.component and components and surface them as actionable validation messages rather than generic failures.Compatibility. Runtime compatibility is narrow and unproven at the edges: pre-release major, 30 alphas deep, Symfony version floor in motion. Plan for the composer constraint to move under us and pin accordingly. Client compatibility is the concrete work item — the 422 contract is new and additive in spirit but behaviorally breaking for callers that build hierarchies in one shot.
Sequencing.
Maintenance. Alpha churn is the dominant ongoing cost: expect repeated upgrades and repeated re-validation until 2.0.0 GA. Budget for a named owner who tracks upstream releases rather than a passive "install and forget." The upside is real — removing Behat collapses two test runners into one, gives a single Codecov upload, and adds Infection mutation testing, all of which raise the quality signal per unit of CI time.
Support. Upstream is a small, active project (PR-numbered, contributor-driven). Escalation paths are GitHub issues, not a vendor SLA. Internal support burden shifts toward us: we own the cycle-audit runbook and the client-side 422 handling. The Behat removal is mildly negative for supportability if our team leans on Gherkin as executable documentation — that readable specification layer is now PHPUnit code, which is more precise but less stakeholder-legible.
Scaling. Cycle validation runs on the write path and walks the ancestor chain, so cost scales with hierarchy depth and requires an indexed parent reference; deep trees will pay more per write than flat ones. This is almost certainly negligible against typical write volumes, but it is a new O(depth) validation step and should be in the performance model. ComponentVoter recursion is now bounded, which removes a genuine availability risk — the previous behavior was an unbounded stack recursion reachable from ordinary authorization checks.
Failure modes.
symfony/yaml / symfony/translation dev dependencies can trigger "we must upgrade Symfony now" pressure that the release notes do not actually justify.Ramp-up. Onboarding gets easier: PHPUnit functional tests on ApiTestCase are the idiom most PHP developers already know, so a new engineer can read and extend the suite on day one — no Behat/Gherkin context required. Conversely, the team loses the plain-language feature files as a specification artifact, so expect to invest once in a short internal note covering the tree/ownership invariants and the 422 contract. Overall ramp-up: low for the test layer, moderate for the domain rules, which are genuinely subtle (draft/published equivalence, group ownership direction).
How can I help you explore Laravel packages today?