PHPackages                             steevanb/user-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. steevanb/user-bundle

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

steevanb/user-bundle
====================

0.0.4(4y ago)2661MITPHPPHP ^7.2 || ^8.0

Since Feb 20Pushed 4y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

[![version](https://camo.githubusercontent.com/9ff7879c2bd2c789b990084810a4f2f55e84d96fe97e4b4cc1318055eece033a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d6465762d7265642e737667)](https://github.com/steevanb/user-bundle)

Installation
============

[](#installation)

### Add dependency

[](#add-dependency)

```
composer require steevanb/user-bundle 0.0.*
# If you want to validate User entity data
composer require symfony/validator symfony/translation
```

\### Add bundle

```
# config/bundles.php
return [
    Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
    steevanb\\UserBundle\UserBundle::class => ['all' => true]
]
```

\### Configure security

```
# config/packages/security.yaml
security:
    encoders:
        App\Entity\User:
            algorithm: bcrypt
            cost: 12
    providers:
        database:
            entity:
                class: App\Entity\User
                property: username
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: ~
            provider: database
            form_login:
                login_path: login
                check_path: login
                default_target_path: index
                username_parameter: login[username]
                password_parameter: login[password]
                csrf_parameter: login[_token]
            logout:
                path: logout
    access_control:
        - { path: ^/secured-area, roles: ROLE_USER }
```

### Create User entity

[](#create-user-entity)

Create the entity:

```
# src/Entity/User.php

namespace App\Entity;

use steevanb\UserBundle\Entity\AbstractUser;

class User extends AbstractUser
{
}
```

Create the mapping:

```
#config/doctrine/User.orm.yml

App\Entity\User:
    type: entity
    table: user

    id:
        id:
            type: integer
            generator: { strategy: AUTO }
            options: { unsigned: true }

    fields:
        username:
            length: 50

        password:
            length: 64

        email:
            unique: true

        roles:
            type: array

        createdAt:
            type: datetime
```

### Create SecurityController

[](#create-securitycontroller)

```
# src/Controller/SecurityController.php
class SecurityController extends steevanb\UserBundle\Controller\AbstractSecurityController
{
    protected function createUser(): AbstractUser
    {
        # Create your User entity
        return new User();
    }

    protected function createRegisterForm(): FormInterface
    {
        return new RegisterType();
    }

    protected function createRegisteredResponse(): Response
    {
        return new Response('User registered.');
    }
}
```

### Login

[](#login)

Add route:

```
# config/routes.yaml
login:
    path: /login
    controller: App\Controller\SecurityController::login
```

Create template:

```
{# templates/Security/login.html.twig #}

{% if error is not null %}
    {{ error }}
{% endif %}

{{ form(formView) }}
```

### Logout

[](#logout)

Add route:

```
logout:
    path: /logout
```

Enable registration
===================

[](#enable-registration)

Registration is not needed and not enabled by default.

Add route:

```
# config/routes.yaml
register:
    path: /register
    controller: App\Controller\SecurityController::register
```

Create RegisterType:

```
# src/Form/Type/RegisterType.php

namespace App\Form\Type;

use steevanb\UserBundle\Form\Type\AbstractRegisterType;

class RegisterType extends AbstractRegisterType
{
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~459 days

Total

4

Last Release

1627d ago

PHP version history (2 changes)0.0.1PHP ^7.2.0

0.0.4PHP ^7.2 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![steevanb](https://avatars.githubusercontent.com/u/5063383?v=4)](https://github.com/steevanb "steevanb (11 commits)")

### Embed Badge

![Health badge](/badges/steevanb-user-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[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)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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