PHPackages                             creonit/verification-code-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. creonit/verification-code-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

creonit/verification-code-bundle
================================

v1.0.2(5y ago)04662GPL-3.0-onlyPHPPHP &gt;=7.2.5

Since Jul 21Pushed 5y agoCompare

[ Source](https://github.com/creonit-dev/VerificationCodeBundle)[ Packagist](https://packagist.org/packages/creonit/verification-code-bundle)[ RSS](/packages/creonit-verification-code-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

VerificationCodeBundle
======================

[](#verificationcodebundle)

```
# config/packages/creonit_verification_code.yaml

creonit_verification_code:
    generator:
        config:
            length: 4
    scopes:
        phone:
            key_pattern: '/^\+\d{1,3} *(\(\d{3,4}\)|\d{3,4})([ -]*\d){6,7}$/'
            max_age: 180
            attempt_time: 120

        scope_name:
            max_age: 120
```

```
# config/routes.yaml

api_verification_code:
    resource: '@CreonitVerificationCodeBundle/Controller/'
    type: annotation
```

\#`custom code generator`

```
use Creonit\VerificationCodeBundle\Generator\AbstractCodeGenerator;
use Creonit\VerificationCodeBundle\Generator\Exception\InvalidConfigurationException;

class MyCodeGenerator extends AbstractCodeGenerator
{
    public function generate(string $key)
    {
        return 'code';
    }

    protected function validateConfig(array $config)
    {
        $requiredFields = ['length'];

        if (!empty($undefinedFields = array_diff($requiredFields, array_keys($config)))) {
            throw new InvalidConfigurationException(sprintf('Not defined parameters [%s]', implode(', ', $undefinedFields)));
        }
    }
}
```

```
# config/packages/creonit_verification_code.yaml

creonit_verification_code:
    generator:
        service: '@App\MyCodeGenerator'
        config:
            length: 8
            my_parameter: 'value'
```

\#`scope code generator`

```
# config/packages/creonit_verification_code.yaml

creonit_verification_code:
    scopes:
        scope_name:
            generator:
              service: '@App\MyCodeGenerator'
              config:
                  length: 8
                  my_parameter: 'value'
            max_age: 120
```

\#`generate code`

```
POST https://mydomain.com/verificationCode/{scope_name}
key={key}
```

```
use Creonit\VerificationCodeBundle\CodeManager;
use Creonit\VerificationCodeBundle\Context\CodeContext;

class PhoneVerificationService
{
    /**
     * @var CodeManager
     */
    protected $codeManager;

    public function __construct(CodeManager $codeManager)
    {
        $this->codeManager = $codeManager;
    }

    /**
     * @param string $key
     *
     * @return \Creonit\VerificationCodeBundle\Model\VerificationCodeInterface
     */
    public function generateCode(string $key)
    {
        $context = new CodeContext($key, 'scope_name');

        return $this->codeManager->createCode($context);
    }
}
```

\#`verification code`

```
PUT https://mydomain.com/verificationCode/{scope_name}
key={key}
code={code}
```

```
use Creonit\VerificationCodeBundle\CodeManager;
use Creonit\VerificationCodeBundle\Context\CodeContext;

class PhoneVerificationService
{
    /**
     * @var CodeManager
     */
    protected $codeManager;

    public function __construct(CodeManager $codeManager)
    {
        $this->codeManager = $codeManager;
    }

    /**
     * @param string $key
     * @param string $code
     *
     * @return bool
     */
    public function verificationCode(string $key, string $code)
    {
        $context = new CodeContext($key, 'scope_name');
        $context->setCode($code);

        return $this->codeManager->verificationCode($context);
    }
}
```

\#`events`

```
Creonit\VerificationCodeBundle\Event\VerificationEvents

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~6 days

Total

3

Last Release

2114d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe3645a19e6345e3d3ac55f795ef31a8ab298648d8865b02d2acd8364f66a131?d=identicon)[creonit](/maintainers/creonit)

---

Top Contributors

[![creonit-dev](https://avatars.githubusercontent.com/u/19219936?v=4)](https://github.com/creonit-dev "creonit-dev (1 commits)")

---

Tags

symfonycreonit

### Embed Badge

![Health badge](/badges/creonit-verification-code-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/creonit-verification-code-bundle/health.svg)](https://phpackages.com/packages/creonit-verification-code-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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