PHPackages                             yaroslavche/doctrine-bitmask-type - 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. [Database &amp; ORM](/categories/database)
4. /
5. yaroslavche/doctrine-bitmask-type

Abandoned → [https://github.com/yaroslavche/BitMaskType](/?search=https%3A%2F%2Fgithub.com%2Fyaroslavche%2FBitMaskType)ArchivedLibrary[Database &amp; ORM](/categories/database)

yaroslavche/doctrine-bitmask-type
=================================

A custom Doctrine type that maps column values to BitMask objects using yaroslavche/bitmask

1334PHP

Since Nov 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yaroslavche/doctrine-bitmask-type)[ Packagist](https://packagist.org/packages/yaroslavche/doctrine-bitmask-type)[ RSS](/packages/yaroslavche-doctrine-bitmask-type/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

### Example

[](#example)

```
# src\Entity\User.php

use BitMask\BitMaskInterface;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity()
 */
class User
{
    const ROLE_USER = 1 getDoctrine()->getManager();
    $user = new User();
    $rolesBitMask = new BitMask(User::ROLE_USER | User::ROLE_EDITOR);
    $user->setRoles($rolesBitMask);
    $em->persist($user);
    $em->flush();
    $repo = $this->getDoctrine()->getRepository(User::class);
    foreach ($repo->findAll() as $user) {
        dump(
            'is admin: ' . $user->isAdmin(),
            'is admin: ' . $user->getRoles()->isSetBit(User::ROLE_ADMIN)
        );
    }
    // ...
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17838239?v=4)[Yaroslav](/maintainers/yaroslavche)[@yaroslavche](https://github.com/yaroslavche)

---

Top Contributors

[![yaroslavche](https://avatars.githubusercontent.com/u/17838239?v=4)](https://github.com/yaroslavche "yaroslavche (2 commits)")

---

Tags

bitmaskdoctrine-ormdoctrine-typephp7

### Embed Badge

![Health badge](/badges/yaroslavche-doctrine-bitmask-type/health.svg)

```
[![Health](https://phpackages.com/badges/yaroslavche-doctrine-bitmask-type/health.svg)](https://phpackages.com/packages/yaroslavche-doctrine-bitmask-type)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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