PHPackages                             atournayre/confirmation-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. atournayre/confirmation-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

atournayre/confirmation-bundle
==============================

Confirmation bundle

2.0.1(2y ago)03.6kPHPPHP &gt;=8.1

Since Nov 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/atournayre/confirmation-bundle)[ Packagist](https://packagist.org/packages/atournayre/confirmation-bundle)[ RSS](/packages/atournayre-confirmation-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (11)Versions (8)Used By (0)

Confirmation Bundle
===================

[](#confirmation-bundle)

This bundle provide confirmation for entities.

Install
-------

[](#install)

### Composer

[](#composer)

```
composer require atournayre/confirmation-bundle
```

### Bundles

[](#bundles)

```
// config/bundles.php

return [
    // ...
    Atournayre\Bundle\ConfirmationBundle\AtournayreConfirmationBundle::class => ['all' => true],
    // ...
];
```

### Configuration

[](#configuration)

Create file and copy content below.

```
# config/packages/atournayre_confirmation.yaml
atournayre_confirmation:
  providers:
    # Example for an email provider
    # email: App\Provider\YourEmailProvider
    # Others providers can be anything : sms, pigeon...
```

### Routing

[](#routing)

Create file and copy content below.

```
# config/routes/atournayre_confirmation.yaml
atournayre_confirmation:
  resource: "@AtournayreConfirmationBundle/Resources/config/routing.yaml"
```

### Services

[](#services)

```
# config/services.yaml
services:
  _instanceof:
    Atournayre\Bundle\ConfirmationBundle\Provider\AbstractProvider:
      tags: ['atournayre.confirmation_bundle.tag.provider']

  Atournayre\Bundle\ConfirmationBundle\Controller\:
    resource: ../vendor/atournayre/confirmation-bundle/src/Controller
    public: true
    tags: ['controller.service_arguments']

  Symfony\Component\DependencyInjection\ContainerInterface: '@service_container'

  Atournayre\Bundle\ConfirmationBundle\Service\ConfirmationCodeService:
    class: Atournayre\Bundle\ConfirmationBundle\Service\ConfirmationCodeService
    arguments:
      $container: '@service_container'

  Atournayre\Bundle\ConfirmationBundle\Repository\ConfirmationCodeRepository:
    class: Atournayre\Bundle\ConfirmationBundle\Repository\ConfirmationCodeRepository

  Atournayre\Bundle\ConfirmationBundle\Config\LoaderConfig:
    class: Atournayre\Bundle\ConfirmationBundle\Config\LoaderConfig

  Atournayre\Bundle\ConfirmationBundle\Service\GenerateConfirmationService:
    class: Atournayre\Bundle\ConfirmationBundle\Service\GenerateConfirmationService

  # Providers needs to be public
  App\Provider\YourCustomProvider:
    class: App\Provider\YourCustomProvider
    public: true
```

Usage
-----

[](#usage)

### Configure entity

[](#configure-entity)

1. Entity needs to implement `Atournayre\Bundle\ConfirmationBundle\Contracts\ConfirmableInterface`.
2. Add `Atournayre\Bundle\ConfirmationBundle\Traits\ConfirmableTrait` to your entity.

### Create a provider

[](#create-a-provider)

For each entity/mapping, you must :

1. Create a provider
2. It must extend from `Atournayre\Bundle\ConfirmationBundle\Provider\AbstractProvider`
3. You need to implement abstract methods
4. You can override public methods

> NOTE
>
> It's discouraged to override `updateEntity()`.
>
> Prefer using `updateAfterConfirmation()` inside the entity to update it after confirmation (example: update status from 'pending' to 'valid').

### Generate confirmation code

[](#generate-confirmation-code)

When you want to generate a confirmation code, just use `Atournayre\Bundle\ConfirmationBundle\Service\GenerateConfirmationService`, call the `__invoke()` method.

Following actions will be performed :

1. A confirmation code will be generated
2. Entity will be tagged as "unconfirmed"
3. The recipient will be notified.

Tip : If you use both id and uuid in your entity, you can specify the id to use as 3rd parameter.

As code are required for verification purpose, the service only send it and don't return it.

### Verify confirmation code

[](#verify-confirmation-code)

Verification can be performed using 2 ways :

- Direct link
- Form

#### Direct link

[](#direct-link)

Using `app_confirmation_code_with_code` route, the user only needs to follow the link and entity will be validated.

#### Form

[](#form)

Using `app_confirmation_code` route, the user needs to fill-in a form with the code provided to him (via notification) so the entity could be validated.

Templating
----------

[](#templating)

It is possible to override any template thanks to Symfony.

Contributing
------------

[](#contributing)

Of course, open source is fueled by everyone's ability to give just a little bit of their time for the greater good. If you'd like to see a feature or add some of your *own* happy words, awesome! Tou can request it - but creating a pull request is an even better way to get things done.

Either way, please feel comfortable submitting issues or pull requests: all contributions and questions are warmly appreciated :).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% 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 ~80 days

Recently: every ~100 days

Total

6

Last Release

924d ago

Major Versions

1.2.1 → 2.0.02023-04-29

### Community

Maintainers

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

---

Top Contributors

[![atournayre](https://avatars.githubusercontent.com/u/4262077?v=4)](https://github.com/atournayre "atournayre (39 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/atournayre-confirmation-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[sylius/sylius

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

8.5k5.8M712](/packages/sylius-sylius)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[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.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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