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

Autonumbering Laravel Package

virusphp/autonumbering

Generate sequential, formatted document numbers in Laravel with virusphp/autonumbering. Define prefixes, suffixes, padding, and reset periods per model, then let the package assign the next number automatically on create.

View on GitHub
Deep Wiki
Context7

Getting Started

The v1.5 release is a compatibility release, not a feature release: the headline change is Laravel 10 support. That single line drives most of what you need to do on day one, because the effective constraint is now the framework and PHP floor rather than any new API.

  1. Check your floor before anything else. Laravel 10 requires PHP 8.1+. If your app is still on Laravel 9 and PHP 8.0, v1.5 is not installable — pin to the previous minor line and schedule the framework upgrade separately. If you are already on Laravel 10, v1.5 is the version you want, since earlier minors were built against Laravel 9's dependency constraints and may not resolve.
  2. Upgrade in an isolated branch. Run composer require <vendor>/<package>:^1.5 and let Composer resolve. If you see conflicts, read them literally — they are almost always illuminate/* or php constraint mismatches, not a broken package.
  3. Look at the published config first. It is the fastest map of the package's surface area: every key is a knob you will eventually touch. Then read the service provider to see what is bound into the container and under what keys — that tells you what you can swap or fake in tests.
  4. Do not republish blindly. Run php artisan vendor:publish --tag=<package>-config only if you have never published, or diff the new stub against your existing config/<package>.php. A compatibility release occasionally ships a corrected default; silently overwriting your tuned config is a common self-inflicted outage.
  5. First use case: wire the package into exactly one code path — a single controller action or a single queued job — and verify it end to end with php artisan tinker before rolling it across the codebase. Confirm the happy path, then confirm the failure path (timeouts, invalid credentials, missing config) so you learn the package's exception types early.

The minimum viable smoke test after upgrading: boot the app, run php artisan config:cache, and hit the one integrated path. If config caching breaks it, you have a closure-in-config problem, which is the most common Laravel 10 upgrade regression.

Implementation Patterns

Resolve from the container, do not instantiate. Bind the package's client/manager through constructor injection in your own services. This keeps your code testable and means a future major version that changes the concrete class name only breaks one binding. Reserve facades for one-off calls in controllers or Artisan commands.

Wrap it in a thin adapter of your own. Even a 40-line wrapper class that exposes the three or four operations you actually use pays for itself: it centralises config reads, normalises the package's exception types into your domain exceptions, and gives you a single place to add logging or retry behaviour. This is especially important for a package whose only recent change is framework compatibility — you have no signal about its API stability, so insulate yourself.

Drive behaviour from config, not from call sites. Put environment-specific values (endpoints, timeouts, credentials, feature flags) in config/<package>.php reading from env(), and never call env() outside config files. On Laravel 10 with config:cache in production, env() calls at runtime return null — a classic and confusing failure.

Queue long-running work. If the package performs network I/O, wrap calls in a job with $tries, $backoff, and $timeout set explicitly, and implement failed() to record the payload. This is the single highest-leverage pattern for third-party integrations: it turns a request-path timeout into a retryable, observable unit of work.

Fake it in tests. Use the package's own fake/shouldReceive hooks if provided; otherwise bind a stub implementation of your adapter into the container in setUp(). Add one integration test that hits the real dependency, tagged and excluded from the default suite, so you find out about upstream breakage without slowing every CI run.

Staged rollout for the Laravel 10 upgrade. If you are upgrading the framework and this package in the same window, land them in separate deploys: framework first on the pinned package version if it still resolves, then the package bump. When something breaks you will know which change caused it.

Gotchas and Tips

  • A one-line changelog is not a guarantee of no breaking changes. "Update to Laravel 10" can still mean dropped PHP 8.0 support, bumped illuminate/* minimums, or internals adjusted for Laravel 10's changes. Run your test suite and diff your composer.lock for illuminate/*, symfony/*, and php constraint movements before trusting it.
  • Semantic versioning caveat: 1.5 is a minor bump, so the maintainer is asserting backward compatibility within 1.x — but a raised PHP floor is technically a break for anyone on 8.0. Treat the floor as the real compatibility boundary, not the version number.
  • Stale published config is the #1 upgrade bug. If the service provider merges config with mergeConfigFrom, your published file wins and you will not see new or corrected defaults. Diff it.
  • Facade aliases and auto-discovery. Laravel 10's package discovery still relies on extra.laravel.providers in composer.json. If the provider is not registering, check php artisan about and bootstrap/cache/packages.php — a stale cache there produces genuinely baffling errors. php artisan package:discover and php artisan optimize:clear are your first two commands when behaviour does not match the docs.
  • Deprecations are noisy but informative. Laravel 10 surfaces PHP 8.1/8.2 deprecations (dynamic properties, ${var} string interpolation, utf8_encode). If the package triggers them, you will see them in your logs — capture them now, because they become hard errors in Laravel 11.
  • Debugging approach: reproduce in tinker first, then enable the package's own debug/logging config key if it has one, then fall back to DB::listen or HTTP client middleware depending on what the package touches. If it wraps Guzzle, Http::macro interception or a HandlerStack middleware will show you the exact request the package builds — usually where config mistakes surface.
  • Extension points to check before forking: container bindings (override via $this->app->bind() in your own provider), published config, events the package dispatches (listen rather than patch), and any Macroable traits. A package that dispatches events is safe to customise; one that does not will tempt you into a fork you will regret at the next upgrade.
  • Watch the repo for a v1.5.x patch. Compatibility releases frequently ship a follow-up within weeks to fix issues surfaced only under real Laravel 10 apps. Pin to ^1.5 rather than 1.5.0 and let patch releases land.
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.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log