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

Technical Evaluation

Architecture fit. Effectively zero at the framework layer. sylius/sequence-bundle is a Symfony 2-era bundle — it assumes kernel registration, DI container compiler passes, service tagging, and Doctrine ORM entity discovery. Laravel has no equivalent boot path: no AppKernel, no bundle extension class, no service provider, no publishable config. Composer will install it, but nothing will load its services or hydrate its entities. The domain concept it encodes — a named, atomically incremented counter rendered through a format mask for order, invoice, and shipment identifiers — is directly relevant to any commerce or billing build, including Laravel. That concept is the leverage; the artifact is not.

Integration feasibility. Low as a dependency, high as a specification. The realistic TPM action is to treat the repository as a readable reference for sequence semantics (type key, monotonic index, format string applied at read time) and commission a native Laravel implementation instead. The core requirement maps cleanly to a sequences table with a type primary key plus an index column, incremented inside DB::transaction() with lockForUpdate(). That is a day or two of engineering, fully owned, with tests.

Technical risk. High, and concentrated in sustainment rather than runtime (the code will never execute). The repo is archived and READ-ONLY, pinned to an EOL Symfony and PHP generation, with four stars and zero dependents — no ecosystem validation, no prior art for failure modes, no CVE response. It is a read-only subtree split of the Sylius monorepo, so history and issues live upstream; forking it as a long-term dependency is not viable.

Key questions.

  1. Must identifiers be gapless (EU invoicing is the usual driver), or merely monotonically increasing? This single answer changes the concurrency design.
  2. What is the write ceiling — peak orders/invoices per second, and how many app nodes?
  3. Do sequences reset on a fiscal period, and do they require prefix/suffix/padding formatting?
  4. Is there a multi-tenant dimension requiring isolated counters per tenant?
  5. What is the audit and reconciliation expectation if a number is consumed without a persisted record, or a counter drifts?

Integration Approach

Stack fit. Do not composer require. Adopt the pattern, not the package. The sequence abstraction — named sequence, current value, atomic increment, display formatter — is the transferable asset and it is a small, well-understood problem that Laravel primitives handle better than a Symfony 2 bundle.

Migration path. (1) Read composer.json, Resources/config/services.xml, and the Model//Doctrine/ directories to extract the semantics; the PHP classes are thin and the wiring is where the behaviour lives. (2) Document what you actually need: sequence name, start value, stride, reset policy, format mask. (3) Implement a Sequence Eloquent model with a next(string $type, string $format) method wrapped in a transaction with a row lock. (4) Port formatting logic under MIT attribution where the license permits; default to a clean rewrite.

Compatibility. Assume incompatible with any modern Laravel stack. No service provider, no facade, no publishable config, and Doctrine annotations are invisible to Eloquent. Symfony 2-era PHP platform constraints will likely fail Composer resolution against a current composer.json before anything runs — and even if it resolves, the result is dead code.

Sequencing.

  1. Settle the gaplessness decision and the reset/formatting policy — this gates the design.
  2. Spike two implementations (DB-row-lock and Redis INCR with durable write-through) and benchmark under simulated concurrency.
  3. Write concurrency and rollback tests before wiring into order or invoice creation; sequence bugs are silent and surface in accounting.
  4. Only then decide whether any original source merits porting — the default answer is no.

Where the leverage is. The package is most useful as a decision aid. It is a compact worked example of the "sequence definition + generator" separation, which makes it an efficient way to force the build-vs-buy conversation to a conclusion (build), and a concrete migration risk item if you are carrying a Sylius 1.x / Symfony 2 estate into a Laravel target.

Operational Impact

Maintenance. Total ownership from the first commit if adopted; near-zero if used as a reference. The ongoing burden of the concept is small — a table, a transaction, a formatter — while the burden of the artifact is unbounded: every PHP upgrade, security review, and bug becomes yours against an archived repo with no maintainer.

Support. No vendor, no effective upstream tracker, no community to escalate to. Internal runbooks must be authored, not inherited. Any team inheriting the Symfony bundle without context will burn time discovering it cannot boot.

Scaling. The naive row-lock design serializes all writers per sequence and becomes a contention point at high order-creation volume; acceptable at low throughput, not at scale. Redis INCR scales horizontally but raises durability questions — a Redis loss can either reissue numbers (duplicates) or skip them (gaps), and neither is acceptable for invoices absent an explicit recovery policy. Native database sequences are the best middle ground where gaps are tolerated.

Failure modes. Duplicate values under read-modify-write races without proper locking; gaps on rollback when the counter is not co-transactional; counter exhaustion on 32-bit storage; drift between a cache-backed counter and its durable store after restart; and silent misformatting when padding or period-reset logic is ported incorrectly. Each of these is invisible until a finance or audit process trips over it.

Ramp-up. Low for the concept — a mid-level engineer can implement and test a correct generator in one to two days. High and wasted for anyone attempting to operate the Symfony bundle inside Laravel; time-box source review of the original to a few hours and redirect the effort to the native build.

Verdict. The 0.025 score is directionally correct: not an adoptable dependency, but a legitimate reference. Recommendation: do not adopt; extract the pattern. Escalate the product decision it surfaces — whether invoice and order numbers may contain gaps, and who may reset a sequence — as a compliance and audit call, independent of this package.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager