PHPackages                             longitude-one/banned-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. longitude-one/banned-bundle

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

longitude-one/banned-bundle
===========================

Banned user (non)-authentication

1.1.0(3y ago)352MITPHPPHP ^7.4|^8.0CI failing

Since Jun 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/longitude-one/banned-bundle)[ Packagist](https://packagist.org/packages/longitude-one/banned-bundle)[ RSS](/packages/longitude-one-banned-bundle/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (3)Dependencies (4)Versions (6)Used By (0)

Banned bundle for Symfony [![PHP Composer](https://github.com/longitude-one/banned-bundle/actions/workflows/php.yml/badge.svg)](https://github.com/longitude-one/banned-bundle/actions/workflows/php.yml) [![Build Status](https://camo.githubusercontent.com/b2621a8272626381c4674c4cf15bf3562ebdbc737af0dbd2a7bac2e454687c99/68747470733a2f2f7777772e7472617669732d63692e636f6d2f6c6f6e6769747564652d6f6e652f62616e6e65642d62756e646c652e7376673f6272616e63683d6d61696e)](https://www.travis-ci.com/longitude-one/banned-bundle)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#banned-bundle-for-symfony--)

LongitudeOne\\BannedBundle is a very small bundle for Symfony framework. Banned users won't be able to login on your application.

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

[](#installation)

Make sure Composer is globally installed, 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 longitude-one/banned-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 longitude-one/banned-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 [
    // ...
    LongitudeOne\BannedBundle\LongitudeOneBannedBundle::class => ['all' => true],
];
```

Configuration
=============

[](#configuration)

First, your user class should implement the BannedInterface, then add the stub method `isBanned`.

Example
-------

[](#example)

```
// src/Entity/User.php

namespace App\Entity;

// declare the interface
use LongitudeOne\BannedBundle\Entity\BannedInterface;
use Symfony\Component\Security\Core\User\UserInterface;

// add the interface
class User implements BannedInterface, UserInterface
{
    //Add a private property
    private bool $banned = false;

    //Your getter can be improved to avoid that an admin bans another one.
    public function isBanned(): bool
    {
        //In this example admins cannot be banned
        return $this->isBanned() and !in_array('ROLE_ADMIN', $this->getRoles());
    }

    //Add a setter if needed
    public function setBanned(bool $banned): self
    {
        $this->banned = $banned;

        return $this;
    }

    //...
}
```

Step2, configure the security layer:

Add the UserChecker service to your security config:

```
# config/security.yaml
security:
  ...
  firewalls:
    ...
    main:
      ...
      user_checker: lo_banned.user_checker
```

Jobs done!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

1421d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5101481?v=4)[Alexandre Tranchant](/maintainers/Alexandre-T)[@Alexandre-T](https://github.com/Alexandre-T)

---

Top Contributors

[![Alexandre-T](https://avatars.githubusercontent.com/u/5101481?v=4)](https://github.com/Alexandre-T "Alexandre-T (46 commits)")

---

Tags

bundlesymfony

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/longitude-one-banned-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/longitude-one-banned-bundle/health.svg)](https://phpackages.com/packages/longitude-one-banned-bundle)
```

###  Alternatives

[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[scheb/2fa

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

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

A generic interface to implement two-factor authentication in Symfony applications

6914.0M62](/packages/scheb-2fa-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[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)

PHPackages © 2026

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