- What is happyr/slugify-bundle used for?
- It is a Symfony bundle that integrates cocur/slugify and exposes slug generation as a Symfony service and a Twig filter. It is not a Laravel package: there is no ServiceProvider, facade, or Blade directive. In Laravel, Str::slug or a small custom binding is the direct replacement.
- Can I install happyr/slugify-bundle in Laravel?
- You can run Composer, but you cannot install it as a Laravel integration. The package is a Symfony bundle with a bundle class, DI extension, and services.xml wiring; Laravel has no bundle registry or equivalent bootstrapping contract. Adoption means porting the few classes into your container, at which point the dependency delivers little.
- Does happyr/slugify-bundle support Laravel 10 or Laravel 11?
- No. It targets Symfony2, which reached end-of-life in November 2018, and that era typically implies PHP 5.x to 7.0 constraints that fail Composer resolution on modern Laravel and PHP 8.1+ applications. There is no Laravel 10 or Laravel 11 support path in the package.
- What is the Laravel equivalent of happyr/slugify-bundle?
- Use Laravel's built-in Str::slug for common ASCII normalization and separator choice. Use cocur/slugify as a standalone, framework-agnostic library if you need harder transliteration cases. For model attributes that need unique slugs, spatie/laravel-sluggable is the maintained Laravel dependency to evaluate.
- How do I generate slugs from a title in Laravel?
- In Laravel, Str::slug() is the built-in path: pass the title, choose a separator, and store the result. If slugs are model attributes that must stay unique, use spatie/laravel-sluggable and enforce uniqueness in the database. Wrapping either behind your own Slugifier interface keeps controllers and templates consistent.
- How do I install happyr/slugify-bundle?
- On Symfony, you add happyr/slugify-bundle with Composer, register the bundle in the kernel, and let its DI extension wire the slugify service. In Laravel there is no bundle registration step, so installing the package does not give you a usable service or Twig filter. Treat any Laravel use as porting a few classes, not installing a package.
- How do I configure happyr/slugify-bundle?
- Configuration lives in Symfony's bundle and DI layer: the bundle class, its extension, and services.xml container wiring. It exposes no Laravel ServiceProvider, facade, or publishable config file. In Laravel you would configure your own binding for cocur/slugify or call Str::slug directly.
- Is happyr/slugify-bundle maintained?
- Treat it as abandoned. The public signals are 2 stars, 0 dependent projects, a composite score of 0.04, and a Symfony2 host that reached end-of-life in November 2018. That leaves no realistic upstream security response, issue triage, or test suite to audit. The code may be fine, but the dependency relationship is the production risk.
- How do I test slug generation in a Laravel app?
- Test your own seam, not this bundle: bind a Slugifier interface in a service provider, then assert known inputs and expected outputs against Str::slug or cocur/slugify. Add an integration test that saves a model and checks the stored slug and collision behavior. There is no bundle test suite in the context to audit.
- Does happyr/slugify-bundle handle unique slugs or collisions?
- No. The bundle wraps slug generation, not collision handling; uniqueness belongs to the database or application design. spatie/laravel-sluggable can help with model-attribute workflows, but you still need a unique index and a retry strategy. Do not mistake slugify for uniqueness.