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
Sequence Bundle

Sequence Bundle Laravel Package

sylius/sequence-bundle

Sylius SequenceBundle generates and manages sequential numbering for Sylius resources, such as order numbers, with configurable generators and prefixes. It provides a flexible sequence system so each entity gets consistent, ordered identifiers.

View on GitHub
Deep Wiki
Context7

[READ-ONLY] Sequences generation for Symfony2 apps.

Frequently asked questions about Sequence Bundle
Can I use sylius/sequence-bundle in a Laravel application?
No. It is a Symfony 2-era bundle that assumes kernel registration, a bundle extension class, DI compiler passes, service tagging, and Doctrine ORM entity discovery. Laravel has no equivalent boot path, so Composer may install the files but nothing will ever load them. The realistic move is to read it as a reference and implement the sequence pattern natively in Laravel.
Is sylius/sequence-bundle still maintained or safe to depend on?
It is archived and marked READ-ONLY, pinned to an end-of-life Symfony and PHP generation. It is a read-only subtree split of the Sylius monorepo, so history and issues live upstream, and it has only a handful of stars and zero dependents. There is no ecosystem validation, no documented failure modes, and no CVE response path, so treating it as a long-term dependency is not viable.
What does Sylius SequenceBundle actually do, and why is it relevant to a Laravel shop?
It generates and manages sequential numbering for Sylius resources such as order numbers, using a named sequence with a monotonically incremented index and a configurable format mask and prefix applied at read time. That domain concept maps directly onto any commerce or billing build, including Laravel, where you need consistent invoice, order, and shipment identifiers. The idea is the leverage here, not the artifact.
Does sylius/sequence-bundle support Laravel 10 or Laravel 11?
No. There is no service provider, no facade, no publishable config, and its Doctrine annotations are invisible to Eloquent. Symfony 2-era PHP platform constraints will most likely fail Composer resolution against a current composer.json before anything runs. Even if it resolves, the result is dead code in a modern Laravel stack.
How do I implement the same sequence generator natively in Laravel?
Create a sequences table with the sequence type as the primary key plus an index column, and add a next(string $type, string $format) method on an Eloquent model. Wrap the increment in DB::transaction() with lockForUpdate() so concurrent requests cannot read the same value, then apply the format mask and prefix at read time rather than storing the rendered string. This is a small, well-understood problem that Laravel primitives handle better than the original bundle did.
How do I guarantee gapless invoice or order numbers in Laravel?
First settle whether identifiers must be truly gapless, as EU invoicing often demands, or merely monotonically increasing, because that single answer changes the concurrency design. A gapless requirement forces you to consume the number inside the same transaction that persists the record, so a rollback releases the value instead of burning it. Decide the reset policy and formatting first, then choose between a locked DB row and Redis INCR with a durable write-through.
Should I fork sylius/sequence-bundle or port its code into my app?
Forking is not viable: the repository is a read-only subtree split pinned to EOL dependencies, with no upstream issue history of its own. The package is MIT licensed, so porting the formatting logic with attribution is permitted where the license allows, but a clean rewrite of the small formatting rules is usually cleaner. The default answer is to build your own and use the original only as a specification.
Will a database row lock scale, or should I use Redis INCR for sequences?
It depends on your write ceiling, meaning peak orders and invoices per second, and how many application nodes you run. A locked row inside a transaction is simple, transactional, and easy to reconcile, while Redis INCR is faster but needs a durable write-through to survive restarts. Spike both implementations and benchmark under simulated concurrency before committing, and account for multi-tenant counters and fiscal-period resets if you need them.
How should I test sequence generation before wiring it into order creation?
Write concurrency and rollback tests first, because sequence bugs are silent and tend to surface later in accounting rather than in the UI. Simulate parallel requests against the same sequence type to confirm no duplicate values are issued, and assert that a failed transaction does not consume a number when gaplessness matters. Also test your reset policy and format mask across period boundaries and tenant boundaries.
What is the migration path if I already depend on Symfony-era sequence logic?
Read composer.json, Resources/config/services.xml, and the Model and Doctrine directories to extract the actual semantics, since the PHP classes are thin and the behaviour lives in the wiring. Document what you really need: sequence name, start value, stride, reset policy, and format mask. Then implement a native Laravel sequence model with a transactional, lock-protected increment and only port original source where the license clearly permits it.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console