indragunawan/sequence-bundle
SequenceBundle provides configurable, database-backed sequence generation for PHP apps, with support for prefixes, suffixes, zero-padding, reset periods, and concurrency-safe counters—ideal for invoice, order, and document numbers.
Verdict up front: this is a Symfony bundle, not a Laravel package. The repository name (sequence-bundle), the description, and the bundle-style architecture mean it targets Symfony's kernel/DI/config-compiler stack. For a Laravel codebase, this is not an integration — it is a rewrite with the source as reference material. Combined with a composite score of 0.375, 5 stars, 0 dependents, and a last release of 2020-03-07, the correct TPM framing is "evaluate as a design reference, do not adopt as a dependency."
Architecture fit
DependencyInjection/Extension, Configuration trees, and a *Bundle class loaded via bundles.php. Laravel has no loader for this. There is no ServiceProvider, no config/*.php publish tag, no migration stub in Laravel's format — so nothing in the package is directly consumable.DB facade, so even the concurrency primitives differ in call shape (Doctrine LockMode::PESSIMISTIC_WRITE vs. Laravel lockForUpdate()), though both map to SELECT ... FOR UPDATE.Integration feasibility
sequences table (name unique, current_value, increment, reset_policy, last_reset_at), a Sequence model, a SequenceService, and a lockForUpdate() inside a transaction.Technical risk
Key questions to resolve before any decision
SELECT ... FOR UPDATE in our target engine (MySQL InnoDB, Postgres yes; some managed/serverless options no)?Stack fit
acme/sequence package with a SequenceServiceProvider, a publishable migration, a config file mirroring the bundle's intent (sequence definitions, format tokens, reset policy), and a thin facade. This keeps the dependency graph clean and gives us full control of the concurrency contract.Migration path
current_value from whatever the current ad-hoc numbering source is (often MAX(id)+1, which is itself a latent duplicate bug worth fixing during this work).Compatibility
lockForUpdate() is correct on MySQL/Postgres; document that SQLite (used in CI) silently ignores it, so concurrency tests must run against the real engine, not SQLite.Sequencing
next($name), current($name), reset($name)).Maintenance
Support
Scaling
SELECT ... FOR UPDATE. At moderate volume (hundreds/sec) this is fine; at high volume it becomes the write hotspot.Failure modes
Ramp-up
Bottom line for the portfolio: treat indragunawan/sequence-bundle as an architectural reference, not a dependency. The 0.375 score, 5 stars, zero dependents, and a 2020 last release all point the same way, and the Laravel/Symfony mismatch settles it. Fund a short internal build instead, and recycle the bundle's behavior spec into our own tests.
How can I help you explore Laravel packages today?