iwf-web/json-request-check-bundle
iwf-web/json-request-check-bundle adds JSON request checking to Symfony applications, helping validate incoming JSON payloads before they reach your controllers. A small integration for more consistent API request handling.
client_max_body_size), or framework middleware. This bundle argues for a framework-level backstop.json_decode) that the real decision is "adopt a dependency" vs. "write ~50 lines of request-event middleware." Given 1 star and 0 dependents, writing it in-house is a legitimate, defensible option and should be explicitly on the table.Consider it when:
json_decode on attacker-controlled bodies.post_max_size / max_input_vars, which do not constrain JSON payload shape — this is the actual gap the package targets.Look elsewhere (or build in-house) when:
ThrottleRequests and proxy-level limits.Adoption shape I'd recommend: a one-sprint spike — read the source (it's small), add it behind a feature flag on one public endpoint, measure p99 overhead, and keep the in-house middleware as the fallback if the dependency proves unmaintained.
For executives: This is a low-cost, low-blast-radius hardening option for our public JSON API. It addresses a specific availability attack — adversarial JSON payloads that exhaust CPU or memory during decoding — which our current proxy and PHP limits do not fully cover. License is MIT; integration cost is small; it changes no customer-facing behavior. The caveat is maturity: the project has essentially no adoption, so we should treat it as code we adopt and own rather than a vendor relationship. Recommendation is a bounded evaluation, not a committed dependency.
For engineering: The bundle adds request-level checks that bound and reject oversized or pathological JSON bodies before json_decode runs — closing a gap that post_max_size and max_input_vars leave open. It's a Symfony bundle, so Laravel services need an equivalent middleware rather than this package. Review the source before adoption; at this size and adoption level, plan to fork or reimplement if the upstream goes quiet, and pair it with proxy-level body limits and request timeouts so the framework control is a backstop, not the primary defense.
How can I help you explore Laravel packages today?