PHPackages                             code-colliders/basic-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. code-colliders/basic-user-bundle

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

code-colliders/basic-user-bundle
================================

A basic integration for authentication in symfony

1.0.2(6y ago)2682CECILL-2.1PHPPHP ^7.1.3

Since Jan 3Pushed 2y ago2 watchersCompare

[ Source](https://github.com/CodeColliders/BasicUserBundle)[ Packagist](https://packagist.org/packages/code-colliders/basic-user-bundle)[ Docs](https://codecolliders.com)[ RSS](/packages/code-colliders-basic-user-bundle/feed)WikiDiscussions master Synced 5d ago

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

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

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require code-colliders/basic-user-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require code-colliders/basic-user-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    CodeColliders\BasicUserBundle\CodeCollidersBasicUserBundle::class => ['all' => true],
];
```

Configure the bundle (using command line tool)
----------------------------------------------

[](#configure-the-bundle-using-command-line-tool)

Use `php bin/console basic-user:init` to create bundle configurations

Use `php bin/console basic-user:init -c User` to create bundle configurations and the User entity

Configure the bundle (manually)
-------------------------------

[](#configure-the-bundle-manually)

### Step 1: Create a User class

[](#step-1-create-a-user-class)

```
$ php bin/console make:entity User
```

the class must implement the `\Symfony\Component\Security\Core\User\UserInterface`

or extends the `\CodeColliders\BasicUserBundle\Entity\UserBase`

### Step 2: create configurations

[](#step-2-create-configurations)

package config:

```
# config/packages/code_colliders_basic_user.yaml

code_colliders_basic_user:
  user_class: App\Entity\User # The fully qualified class for your user
  redirect_route: home # Default redirection after login (default: login page)
  user_identifier: email # Unique field used in your user entity to login
  branding: # Optional part
    logo_url: null # Picture url to add a logo in login form
    background_url: null # Picture url to add a background image in login form page
    form_title: "Log in" # The title of the form (default: Log in)
    catchphrase: "Using basic user bundle" # A catchphrase at the bottom of the form
    form_identifier_type: email # Type of field for user identifier
```

> you can use `php bin/console config:dump-reference code_colliders_basic_user` to get the configuration file reference.

routing:

```
# config/routes/code_colliders_basic_user.yaml

basic_user_login:
  resource: '@CodeCollidersBasicUserBundle/Resources/config/routes.xml'
  prefix: /user # The prefix for routes '/login' and '/logout'
```

Configure the security bundle
-----------------------------

[](#configure-the-security-bundle)

```
# config/packages/security.yaml

security:
    # Roles configurations
    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    encoders:
        App\Entity\User:  # Your user class
            algorithm: auto

        # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        # used to reload user from session & other features (e.g. switch_user)
        app_user_provider:
            entity:
                class: App\Entity\User
                property: username

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: true
            logout:
                path: code_colliders_basic_user_logout
            guard:
                authenticators:
                    - code_colliders_basic_user.authenticator

            # activate different ways to authenticate
            # https://symfony.com/doc/current/security.html#firewalls-authentication

            # https://symfony.com/doc/current/security/impersonating_user.html
            # switch_user: true

    # Easy way to control access for large sections of your site
    # Note: Only the *first* access control that matches will be used
    access_control:
        # - { path: ^/admin, roles: ROLE_ADMIN }
        # - { path: ^/profile, roles: ROLE_USER }

```

> you can use `php bin/console config:dump-reference security` to get the security configuration file reference.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~64 days

Total

3

Last Release

2197d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ae8a2c236c8d3ce96dc7d261f3be11399aeb391f07ff658a58c8139ff69f63e?d=identicon)[Dunarr](/maintainers/Dunarr)

![](https://www.gravatar.com/avatar/6357c95ded7f9a1de66825c5bb90b5ff6c8a125585277bb047c199471f163cc9?d=identicon)[niamor](/maintainers/niamor)

---

Top Contributors

[![dunarr](https://avatars.githubusercontent.com/u/32509774?v=4)](https://github.com/dunarr "dunarr (8 commits)")[![Niamor70](https://avatars.githubusercontent.com/u/581616?v=4)](https://github.com/Niamor70 "Niamor70 (4 commits)")

---

Tags

User management

### Embed Badge

![Health badge](/badges/code-colliders-basic-user-bundle/health.svg)

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

###  Alternatives

[friendsofsymfony/user-bundle

Symfony FOSUserBundle

3.2k35.4M311](/packages/friendsofsymfony-user-bundle)[scheb/2fa

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

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

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

63397.4k6](/packages/web-auth-webauthn-symfony-bundle)[nucleos/user-bundle

Lightweight user management for symfony

61380.7k5](/packages/nucleos-user-bundle)

PHPackages © 2026

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