- Can I use rudak/slug-bundle in a Laravel application?
- No. rudak/slug-bundle is a Symfony2 bundle: it registers a Bundle class in AppKernel, wires services through the Symfony container, and ships a Twig extension. Laravel's service providers, facades, and Blade have no equivalent hooks here, so there is nothing to register in a Laravel app. Wrapping a Symfony bundle in a Laravel service provider is a shim around a shim and adds no value over Str::slug().
- Does rudak/slug-bundle support Laravel 10, 11, 12 or PHP 8?
- Composer resolution is very unlikely to succeed. The package targets the Symfony2 era, with constraints around symfony/framework-bundle ~2.x and Twig ~1.x, which collide with modern PHP 8 runtimes and current Laravel releases. Even a forced install would leave you with framework code that is end-of-life and unpatched.
- What does rudak/slug-bundle actually do?
- It generates URL-friendly slugs for Doctrine entities by reading configurable source fields and writing to a target slug property. Generation is hooked into Doctrine lifecycle events, so slugs can be produced automatically on persist or update. It also claims transliteration and uniqueness handling so slugs stay clean and SEO-friendly. The value is the small slugging algorithm, not the Symfony bundle scaffolding around it.
- What should Laravel developers use instead of rudak/slug-bundle?
- Start with Str::slug(), which covers the vast majority of slugging needs in Laravel with no extra dependency. If you want Eloquent lifecycle automation and collision handling, spatie/laravel-sluggable and cviebrock/eloquent-sluggable are maintained and idiomatic. Both are Laravel-native, actively released, and safer than adopting an abandoned Symfony2 bundle.
- Does rudak/slug-bundle handle duplicate slugs and collisions?
- The package advertises unique slug handling to avoid collisions, but that is bundle-level behaviour and not a guarantee under concurrency. Database-level unique constraints, race conditions between concurrent inserts, and deterministic collision suffixes remain your responsibility. For public URLs you should enforce uniqueness in the schema and decide the suffix strategy explicitly.
- Is rudak/slug-bundle safe to use in production?
- The signals are uniformly negative: Symfony2 is end-of-life with no security patch stream, and the package shows no stars, no dependents, and no visible release cadence. That is the signature of an abandoned package, and abandoned PHP packages are a supply-chain liability through unpatched CVEs and Packagist resolution failures. Any transitive dependency it pulls in is unpatched by definition.
- How do I migrate existing slugs off rudak/slug-bundle without breaking URLs?
- Do not install the bundle into Laravel. Instead define a SlugGenerator contract with a single generate method, capture your current producer's output as a golden-test corpus including diacritics, CJK, emoji, long titles, empty input, and trailing punctuation, then implement the contract with Str::slug() or ported legacy logic. Run shadow comparisons against the corpus before switching, and keep redirect history for any slug that changes because inbound links and SEO depend on it.
- Can I copy the slugging logic from rudak/slug-bundle into my own codebase?
- Technically yes, because the algorithm is a small utility concern and the code surface is containable. Copying rather than requiring removes the runtime dependency and the framework coupling, but it transfers ownership and license obligations to you. Check the license in the repository before porting, and plan for who maintains the ported code.
- Does rudak/slug-bundle transliterate accents and non-Latin characters?
- The package advertises transliterated slugs, which is the interesting part of the algorithm. Whether that matches Str::slug() byte for byte on diacritics, CJK, and emoji is not established, so verify with a test corpus before relying on it. If you only need clean ASCII slugs for new content, Laravel's own slug helper is sufficient.
- How does rudak/slug-bundle integrate with Doctrine entity events?
- It hooks Doctrine lifecycle events through the Symfony service container, so slug generation fires on persist or update without boilerplate in your entity. Source fields and the target slug property are configurable, letting you choose which attributes feed the slug. That design is genuinely useful in Symfony2, but it maps to Eloquent model events and observers, not to Doctrine listeners, so it does not transfer to Laravel.