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 3d 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 49% 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

3203d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28d4a85082340971bdc341f37c3f6e73d85a94bb9ff7816306d9b33291524f65?d=identicon)[mkebza](/maintainers/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

[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[omines/datatables-bundle

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

2851.4M6](/packages/omines-datatables-bundle)[onurb/doctrine-yuml-bundle

Symfony Bundle to visualize the mapping of your entities with Yuml

4198.6k](/packages/onurb-doctrine-yuml-bundle)[kucharovic/money-bundle

This bundle provides integration for Money library in your Symfony project.

2253.7k](/packages/kucharovic-money-bundle)[huluti/doctrine-relations-analyser

A Symfony bundle that provides tools for analyzing Doctrine relationships

145.3k](/packages/huluti-doctrine-relations-analyser)

PHPackages © 2026

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