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

2334PHP

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 2w ago

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 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

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

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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