acquia/http-hmac-php
PHP implementation of HTTP HMAC authentication for securing service-to-service API requests. Sign and verify requests using shared secrets, with support for PSR-7 and framework request objects, making it easy to add tamper-resistant authentication to PHP applications.
Http:: (or a dedicated Illuminate\Http\Client\Factory), plus a secret-management story. That means the roadmap item is "HMAC signing middleware + key rotation runbook," not "install package." Sizing it honestly prevents a one-point estimate turning into a three-point one.psr/http-message still accepts ^1.0 || ^2.0, so adoption does not force a PSR-7 major migration; Guzzle 7 is already the Laravel default client. Updated dev/suggested deps (Guzzle ^7.0, laminas-diactoros ^2.2 || ^3.0, symfony/security-bundle ^5.4, psr-http-message-bridge ^2.1 || ^6.4 || ^7.0, PHPUnit ^9.6) touch test tooling only. Small blast radius is exactly what a dependency-approval decision wants to see.Adopt when:
psr/http-message v1 or v2 without a forced major bump.Look elsewhere / proceed with caution when:
AuthorizationHeaderBuilder, RequestSigner, ResponseSigner, HmacToken, HmacAuthenticationEntryPoint, or the Malformed*Exception classes, overrides need explicit ?Type nullable hints or they will still emit 8.4 deprecations — and become runtime failures wherever deprecations are promoted. Exception subclasses are the trap: they only run on error paths, so a green test suite proves nothing. Budget a grep-and-fix task.For executives: This is a maintenance and compatibility milestone, not a feature drop — and that is the good news. The HMAC signing library behind our partner and service-to-service API authentication is actively maintained, has been brought up to date for PHP 8.4, and now runs its suite on modern CI across PHP 7.4, 8.4 and 8.5. That means fewer security-patch surprises, no forced rewrite of our request-signing layer, and one less blocker in the PHP upgrade plan. The trade-offs are small and known: our runtime floor moves to PHP 7.4, and any custom subclasses need a one-line-per-signature type-hint cleanup. The alternative — writing and owning signature canonicalization ourselves — carries materially higher security and maintenance risk for zero product differentiation. Worth being explicit that this is a library we integrate, not a turnkey Laravel feature: the middleware, secret rotation, and on-call runbook are our deliverables, so the cost sits in glue, not in the dependency.
For engineering: 6.2.0 is source-compatible for callers. Minimum PHP is now 7.4; psr/http-message remains ^1.0 || ^2.0, so no PSR-7 major bump, and Guzzle 7 is already our default. Implicitly nullable parameters now carry explicit ?Type hints — if we extend AuthorizationHeaderBuilder, RequestSigner, ResponseSigner, HmacToken, HmacAuthenticationEntryPoint, or the Malformed*Exception classes, mirror those nullables in our overrides to stay deprecation-free on 8.4. Dev/suggested dependencies have moved forward (Guzzle 7, laminas-diactoros 2.2/3.0, symfony/security-bundle 5.4, psr-http-message-bridge 2.1/6.4/7.0, PHPUnit 9.6) and may require lockfile updates in test tooling only. Two pre-existing hazards to retest at the same time: handler-stack ordering (signing must run after the body is finalized and before send) and deterministic body hashing on streamed or retried requests where the stream may already be consumed. Recommended sequence: inventory which endpoints genuinely need HMAC, pin ^6.2 on a branch, run the suite on 8.4 with deprecations surfaced, fix subclass signatures, canary one integration in staging with receiver-side verification on, then roll out per service — and only then schedule the 8.4 runtime upgrade, since 6.2.0 is a prerequisite for a clean run. Instrument the signer to log a hash of the canonical string and the key ID, never the secret.
How can I help you explore Laravel packages today?