PHPackages                             kebza/sequence-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. kebza/sequence-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

kebza/sequence-bundle
=====================

Symfony bundle that provides ability to create multiple sequences for invoice / user codes. Saving to database or files

1.0.0(8y ago)1265MITPHPPHP &gt;=5.6.2

Since Aug 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mkebza/KebzaSequenceBundle)[ Packagist](https://packagist.org/packages/kebza/sequence-bundle)[ RSS](/packages/kebza-sequence-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Sequence bundle
===============

[](#sequence-bundle)

Generating sequences (for invoices / orders / ...). With ability to have custom format for numbering.

Installation:
-------------

[](#installation)

```
composer require kebza/sequence-bundle
```

Enable bundle in AppKernel

```
# app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Kebza\SequenceBundle\KebzaSequenceBundle(),
        // ...
    );
}
```

If you are using doctrine storage, you need to add mapping to your entity manager.

```
doctrine:
    orm:
        mappings:
            KebzaSequenceBundle: ~
```

and then update your database schema

```
php bin/console doctine:schema:update
```

Configuration
-------------

[](#configuration)

Before you start you need to configure your sequences.

```
kebza_sequence:
    storage: doctrine # file | memory
    sequences:
        first:
            pattern: '{YYYY}{ID|6|WEEK}'
            step: 1
            initial: 1
        second:
            pattern: '{YY}{WW}{ID|6|WEEK}'
            step: 1
            initial: 1

```

Usage
-----

[](#usage)

You can use sequences by requestiong *kebza.sequence.manager* service with its methods.

```
// From controller
$manager = $this->get('kebza.sequence.manager');
$manager->current('first'); // If sequence not initialized, returns null otherwise current formatted value
$manager->next('first'); // Returns next value
$manager->increment('first'); // Increments by configuration of step.
```

Storages:
---------

[](#storages)

- *doctrine* - saves sequences in database
- *file* - saves information into files in directory
- *memory* - Once script ends, info about sequences is lost

Pattern
-------

[](#pattern)

In pattern there is possible to use replaces to format final output:

- *{ID|X|Y}* - Replaces ID with current number. If X is specified, will add padding using zeroes to final length. Y can be YEAR, MONTH, WEEK and means that sequence will reset on every new year, month, week
- *{YYYY}* - Year - 2017
- *{YY}* - Year - 17
- *{MM}* - month 12
- *{WW}* - Week number

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3251d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1664992?v=4)[Marek Kebza](/maintainers/mkebza)[@mkebza](https://github.com/mkebza)

---

Top Contributors

[![mkebza](https://avatars.githubusercontent.com/u/1664992?v=4)](https://github.com/mkebza "mkebza (6 commits)")

---

Tags

symfonybundledoctrinefilessequence

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kebza-sequence-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kebza-sequence-bundle/health.svg)](https://phpackages.com/packages/kebza-sequence-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46118.2M166](/packages/sonata-project-doctrine-orm-admin-bundle)[omines/datatables-bundle

Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support

2841.5M6](/packages/omines-datatables-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

939.0k](/packages/ahmed-bhs-doctrine-doctor)[spiriitlabs/form-filter-bundle

Symfony bundle for dynamic filtering, search forms and Doctrine query generation

39542.3k11](/packages/spiriitlabs-form-filter-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
