philetaylor/hashids-bundle
Symfony bundle integrating Hashids to obfuscate numeric IDs as short, unique, non-sequential strings. Provides services and Twig filters for encoding and decoding IDs with configurable salt, length, and alphabet.
hashids/hashids) is a small, stable, dependency-free PHP library. The realistic decision is not "adopt this bundle vs. build hashids" — it is "depend on hashids/hashids directly and wire a small service provider/factory" vs. "adopt a wrapper." Given this bundle's signals (1 star, 0 dependents, single maintainer, last release Sept 2022, score 0.005), the defensible roadmap call is use the upstream library, not this bundle.public_id column (migration + unique index, but stable links and queryable). This is a real product trade-off worth an explicit decision record, especially for anything customer-facing or emailed.Consider it when all of the following hold:
Hashids object yourself.Look elsewhere when:
vinkla/hashids) or bind hashids/hashids in a service provider. Directly cheaper than adapting a Symfony bundle.To executives: This addresses a real but modest problem — our URLs leak sequential IDs, which exposes customer/order volume and invites scraping. The fix is cheap: encoding IDs into short opaque strings. However, the package in front of us is a near-unmaintained single-author Symfony wrapper with essentially zero adoption, so I do not recommend taking it as a dependency; I recommend the underlying library directly, which is small, stable, and free. Effort is low (days, not weeks), and it removes an easy competitive-intelligence leak. It is explicitly not a security control and does not change our authorization requirements.
To engineering: philetaylor/hashids-bundle is a thin Symfony DI wrapper around hashids/hashids — one maintainer, one star, no dependents, last release Sept 2022. Recommendation: depend on hashids/hashids directly and register a small factory/service; if we do adopt the bundle, pin it, vendor it, and treat it as ours to maintain. Either way: (1) salt lives in secrets/env, never in code; (2) define a salt-rotation plan, because rotating breaks every existing encoded link unless we persist a public_id column; (3) add authorization on every endpoint regardless — Hashids is reversible encoding; (4) add round-trip and minimum-length tests; (5) confirm PHP/Symfony version compatibility against the 2022 release before committing.
How can I help you explore Laravel packages today?