- Is philetaylor/hashids-bundle compatible with Laravel?
- No. philetaylor/hashids-bundle is a Symfony bundle, not a Laravel package. It relies on Symfony's Bundle class and DependencyInjection extension, which Laravel's container does not load. While Composer may install it, you would have to wire its services manually and gain nothing over using the underlying hashids/hashids library. For Laravel, bind hashids/hashids directly instead.
- Does philetaylor/hashids-bundle provide a Laravel service provider or facade?
- The repository is a Symfony bundle: it ships a Bundle class and a DependencyInjection extension that registers services into the Symfony container. Laravel does not consume Symfony bundles; it uses Illuminate service providers. There is no documented Laravel service provider or facade, and the metadata shows no extra.laravel entry. Treat the Laravel framing as a catalog misclassification and verify composer.json before any design work.
- How do I install philetaylor/hashids-bundle in a Laravel app?
- You can run composer require philetaylor/hashids-bundle, but installation does not equal integration in Laravel. The package will not auto-register services because Laravel does not read Symfony bundle metadata. You would need to instantiate its classes manually or write an adapter, which defeats the purpose. The recommended path is to require hashids/hashids and bind it in an application service provider.
- What is the difference between philetaylor/hashids-bundle and hashids/hashids?
- The bundle is a Symfony container wrapper around the framework-agnostic hashids/hashids library. The underlying library provides the actual encode, decode, encodeHex, and decodeHex behavior and is actively maintained with broad adoption. The bundle adds Symfony DI wiring and Twig filters, which are not useful in Laravel. In Laravel, the correct dependency is hashids/hashids itself.
- How do I encode and decode IDs with Hashids in Laravel without this bundle?
- Require hashids/hashids, then bind it as a singleton in a service provider using config values from config/hashids.php. Inject the Hashids instance into controllers or services and call encode() or decode() as needed. This gives you the same feature surface as the bundle in roughly 30 lines you own. You can also add a Blade directive or helper for convenience if desired.
- Is philetaylor/hashids-bundle maintained and safe for production use?
- Adoption signals are very weak: one star, zero dependents, a single maintainer, and a last release dated 2022-09-21. Hashids is security-adjacent because it involves salt handling and ID enumeration, so an unmaintained wrapper is a poor place to sit. There is no security contact or issue-response history that suggests active governance. For production, prefer the maintained underlying library and own the small integration layer.
- What PHP and Symfony version constraints does philetaylor/hashids-bundle have?
- The last release was in September 2022, so constraints likely target older PHP and Symfony component ranges. It may predate PHP 8.2/8.3 support and Symfony 6/7, which modern Laravel versions pull in. Check composer.json for exact php and symfony/* constraints before attempting a proof of concept. A hard conflict there ends the evaluation immediately.
- Will philetaylor/hashids-bundle conflict with Laravel's Symfony components?
- Yes, that is a real risk. Laravel 10, 11, and 12 depend on Symfony 6/7 components, while a 2022 bundle may require older Symfony versions. Composer may fail to resolve or may downgrade shared packages in ways that break your application. Test in a throwaway branch against your real lockfile and capture any resolution conflicts.
- Does philetaylor/hashids-bundle work with Laravel Blade or only Symfony Twig?
- The bundle's Twig filters are Symfony/Twig-specific and will not work in Laravel Blade. Laravel uses Blade, so you would need custom directives, helpers, or view composers to achieve the same output. Since you are not adopting the bundle anyway, implement a small Blade directive around hashids/hashids if you need template-level encoding.
- What are the best Laravel alternatives to philetaylor/hashids-bundle for obfuscating IDs?
- Use hashids/hashids directly or choose a purpose-built Laravel wrapper with active maintenance and Laravel-tagged releases. Search Packagist for Laravel Hashids packages and check stars, dependents, release dates, and support for your Laravel version. Avoid Symfony bundles in Laravel unless you are prepared to own an adapter, which is not worth it here. The safest default is the underlying library plus a thin application binding.