Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eloquent Sluggable Laravel Package

rolies106/eloquent-sluggable

Eloquent Sluggable generates clean, unique URL slugs from your model attributes automatically. Customize slug sources, separators, and uniqueness rules, and keep slugs in sync on create or update with minimal configuration.

View on GitHub
Deep Wiki
Context7

Getting Started

The 3.1.1 release is a patch that addresses exceptions surfacing during test execution. It is not a feature release, and the notes do not disclose which code paths were affected, so treat your first task as verification rather than adoption.

  1. Update and re-run your suite before anything else. Bump the constraint (composer require vendor/package:^3.1.1 or composer update vendor/package --with-dependencies) and run the full suite, including the tests that were previously noisy. The value of this release is only realised if you confirm the specific failures you were seeing have actually gone away.
  2. Look first at your test bootstrap, not your application code. Errors "that throw from testing" usually originate in one of three places: a service provider doing work at boot that assumes a real environment, a facade or container binding being resolved before the app is fully booted, or static state leaking between tests. Check tests/TestCase.php, any custom setUp()/tearDown(), and the package's own config defaults.
  3. Diff the release against 3.1.0. Since the notes are a single line, read the actual commit history or changelog in the repository. A patch that changes exception behaviour can move an error from a hard failure to a silently swallowed one — you want to know which.
  4. First meaningful use case: if you had failing or flaky tests that touched this package, 3.1.1 is the upgrade that should let you remove any markTestSkipped(), @group exclusions, or try/catch workarounds you added to get CI green. Remove one workaround at a time and confirm.

Implementation Patterns

Isolate the package's test surface. If the fixes concern test-time exceptions, the practical pattern is to make the boundary between your test harness and the package explicit:

protected function setUp(): void
{
    parent::setUp();
    // Resolve the package early so boot-time errors surface with a clear stack trace
    $this->app->make(\Vendor\Package\Contracts\Client::class);
}

Doing this in a base test case means a regression in the package's container bindings fails on a single line rather than deep inside an unrelated test.

Prefer fakes and container swaps over environment flags. If the prior errors were caused by the package attempting real work during tests, bind a fake rather than toggling behaviour via config:

$this->app->instance(\Vendor\Package\Contracts\Client::class, new FakeClient());

This survives future patch releases; config flags that disable behaviour are the kind of thing that quietly gets renamed.

Pin and promote deliberately. Run 3.1.1 in the CI matrix alongside 3.1.0 for one cycle if you have the capacity. With a one-line changelog, parallel runs are the cheapest way to confirm the fix is real and that nothing else shifted.

Feature tests over unit tests for this class of bug. Exceptions thrown during testing are frequently bootstrapping or lifecycle issues, which only appear when the full framework is present. A RefreshDatabase feature test exercising the package's main entry point is worth more here than a mocked unit test.

Wire it into CI as a guard. If the fix addressed errors that only appeared under test, add a smoke test that hits the package's primary integration path so a future regression fails loudly rather than intermittently.

Gotchas and Tips

  • A one-line changelog is a yellow flag, not a red one. Patch releases fixing exception handling can convert a loud failure into a suppressed one. After upgrading, assert that the errors are genuinely resolved — not merely that they no longer appear. Add an explicit assertion on your test's outcome rather than relying on "no exception thrown."
  • config:cache will mask config changes. If you're debugging at all, run php artisan config:clear && php artisan cache:clear before concluding anything about the package's behaviour. Cached config is the most common cause of "it works locally but not in CI."
  • withoutExceptionHandling() is your debugging lever. If 3.1.1 changes what gets rethrown versus reported, $this->withoutExceptionHandling() in a failing test will show you the original exception and stack trace, which the normal test harness may obscure.
  • Watch for version constraints in your own code. If you've pinned vendor/package to 3.1.0 in composer.json, or something in your composer.lock is holding it back transitively, you may "upgrade" without actually upgrading. Verify with composer show vendor/package.
  • Auto-discovery vs manual registration. If the package registers a provider and you also added it to config/app.php, you may be booting it twice — a plausible source of test-only exceptions. Check bootstrap/providers.php (Laravel 11+) or config/app.php for duplicates.
  • Static and singleton state persists between tests. Package-level singletons resolved once can carry state across test methods. In tearDown(), consider $this->app->forgetInstance(...) for anything the package registers as a singleton.
  • Extension points to remember. Before working around package behaviour in tests, check whether it exposes a container binding, a facade shouldReceive(), or a config-driven driver. Most packages give you a swap point; patching around the package is the option of last resort.
  • Deprecation watch. The notes mention nothing about deprecations, so 3.1.1 is presumed non-breaking. Still, scan the source diff for newly added trigger_error(..., E_USER_DEPRECATED) calls or @deprecated annotations if you plan to stay on the 3.x line long-term.
  • If the fix doesn't resolve your issue, the failure is likely in your test harness rather than the package. Reproduce in a bare Laravel install with only the package and one test before filing an issue — that isolation is expected of bug reports and dramatically shortens the fix cycle.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel