roukmoute/hashids-bundle
Symfony bundle integrating Hashids to encode and decode numeric IDs into short, unique, obfuscated strings. Configure salt, length, and alphabet, then use services or Twig filters to hide database IDs in URLs.
/orders/1042) or non-guessable hashed tokens (/orders/Xk9bQ2). This package is the Symfony-native implementation of that decision, converting route parameters on the fly so controllers keep working with integer IDs internally.ValueResolver mechanism (replacing the legacy param-converter path). This directly gates your Symfony 6.x/7.x upgrade plan: adopting v4 means committing to Symfony 6.2+ and PHP 8.1+, and auditing any existing @ParamConverter-style annotations in your routes.Adopt when:
ValueResolver-native conversion (v4.0.0), or on Symfony 5.4/6.0–6.1 and can stay on v3.1.0.hashids/hashids rather than owning the wiring, DI configuration, and per-route resolver plumbing.Look elsewhere when:
For executives (one paragraph): We recommend adopting roukmoute/hashids-bundle to stop exposing sequential database IDs in public URLs. It is a small, focused Symfony integration of a mature hashing library that converts IDs on the way in and out of routes, so no data-model change is required and internal code keeps using plain integers. The business outcome is reduced link-guessing and scraping exposure on shareable links, invitations, and receipts, at the cost of one lightweight dependency. Note the new v4.0.0 requires Symfony 6.2+ and PHP 8.1+, so this lands as part of our platform upgrade rather than as a standalone change.
For engineering:
ValueResolver (6.2+). Dropping it in means auditing routes for @ParamConverter/sensio-style annotations and any HashidsConverter usages, and confirming framework.value_resolvers wiring (tagged services auto-register by default).How can I help you explore Laravel packages today?