Skip to content

chore: allow spatie/laravel-sluggable v5 and v6 - #74

Merged
ManukMinasyan merged 1 commit into
2.xfrom
chore/allow-sluggable-6
Nov 23, 2026
Merged

ManukMinasyan merged 1 commit into
2.xfrom
chore/allow-sluggable-6

Conversation

@ManukMinasyan

Copy link
Copy Markdown
Member

Host apps can now install Ink alongside spatie/laravel-sluggable 5 or 6. Until now the ^4.0 pin kept any app that upgraded sluggable from installing Ink at all.

What changed

composer.json: spatie/laravel-sluggable goes from ^4.0 to ^4.0 || ^5.0 || ^6.0. No code changes.

Why it is safe

Ink touches sluggable in three places, and each keeps its signatures in 5 and 6:

  • Category swaps in its own generateSlugAction().
  • ReclaimsTrashedSlugsAction extends GenerateSlugAction and overrides makeUnique().
  • ReclaimsTrashedSlugs calls makeUnique() and SlugOptions::useSuffixOnFirstOccurrence(), and reads extraScopeCallback.

The v6 upgrade guide's breaking changes cover models that pair HasSlug with HasUuids or HasUlids, and self-healing route keys. Category uses neither. Version 5 changed named-column route bindings such as {post:slug}. Ink's routes take {slug} as a plain string, and only Category uses HasSlug. Both versions require PHP 8.4 and Laravel 13, which Ink already requires. The range keeps ^4.0, as the earlier ^3.0 || ^4.0 widening did, so hosts still on 4 are unaffected.

Checked

The full suite passed locally on each version: 234 tests on sluggable 4.0.6, 5.0.1 and 6.0.0, including SlugReclaimTest. CI tests the newest version the range allows.

Category overrides generateSlugAction(), ReclaimsTrashedSlugsAction overrides
GenerateSlugAction::makeUnique(), and ReclaimsTrashedSlugs reads
SlugOptions::useSuffixOnFirstOccurrence() and extraScopeCallback. All of them
keep their signatures in v5 and v6. The v6 upgrade guide's breaking changes
cover HasUuids/HasUlids models and self-healing route keys, and Ink uses
neither.

The ^4.0 pin blocked host apps from upgrading to v6. The suite passes on
sluggable 4.0.6, 5.0.1 and 6.0.0.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ManukMinasyan
ManukMinasyan merged commit b2bf79c into 2.x Nov 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants