PHPackages                             indigophp/guardian-doctrine - 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. indigophp/guardian-doctrine

Abandoned → [guardianphp/doctrine-integration](/?search=guardianphp%2Fdoctrine-integration)ArchivedLibrary[Database &amp; ORM](/categories/database)

indigophp/guardian-doctrine
===========================

Doctrine integration for Guardian

0103PHP

Since Mar 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/indigophp-archive/guardian-doctrine)[ Packagist](https://packagist.org/packages/indigophp/guardian-doctrine)[ RSS](/packages/indigophp-guardian-doctrine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Indigo Guardian Doctrine
========================

[](#indigo-guardian-doctrine)

[![Latest Version](https://camo.githubusercontent.com/5d1cfbaa7007a3c28d04d5be28f4a1cf3c7c3c868894d91594c95e85d659e66d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696e6469676f7068702f677561726469616e2d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://github.com/indigophp/guardian-doctrine/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/0f1510bd0990597c874087e4857de39364211b67ece876c1ba281ad95beb4a0e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696e6469676f7068702f677561726469616e2d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/indigophp/guardian-doctrine)[![Code Coverage](https://camo.githubusercontent.com/13527affbbd4ea0839e48774432b8829ba54abaf64a6e82d3a618ed6c5c1875f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f696e6469676f7068702f677561726469616e2d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/indigophp/guardian-doctrine)[![Quality Score](https://camo.githubusercontent.com/d4bf14ab7107b5213559edb1f096a3226b352d8d209b7bed658666a5d49b1516/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696e6469676f7068702f677561726469616e2d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/indigophp/guardian-doctrine)[![HHVM Status](https://camo.githubusercontent.com/d12583ac8c6e8500e66cdbc76a567189df8a9354561772b55ebaca8c3327ac8c/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f696e6469676f7068702f677561726469616e2d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](http://hhvm.h4cc.de/package/indigophp/guardian-doctrine)[![Total Downloads](https://camo.githubusercontent.com/b7d758cb66a7e62ce71a5354217a914c1ab774ae156a477c46e48812f7ddcc25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6469676f7068702f677561726469616e2d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/indigophp/guardian-doctrine)

**Doctrine integration for Guardian.**

Install
-------

[](#install)

Via Composer

```
$ composer require indigophp/guardian-doctrine
```

Usage
-----

[](#usage)

Simply pass an `EntityManagerInterface` instance and an Entity class name to the `Indigo\Guardian\Identifier\Doctrine` class and you are good to go:

```
use Indigo\Guardian\Identifier\Doctrine;

$identifier = new Doctrine($entityManager, 'Indigo\Guardian\Caller\User\Simple');

// optional, ['username'] by default
$identifier->setIdentificationFields(['username']);

// optional, 'loginToken' by default
$identifier->setLoginTokenField('id');
```

Testing
-------

[](#testing)

```
$ phpspec run
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Márk Sági-Kazár](https://github.com/sagikazarmark)
- [All Contributors](https://github.com/indigophp/guardian-doctrine/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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://www.gravatar.com/avatar/0e4e105cea62b616d4cb376b08a849b6a428f646998537de150d16a8eb537b90?d=identicon)[mark.sagikazar](/maintainers/mark.sagikazar)

---

Top Contributors

[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (6 commits)")

### Embed Badge

![Health badge](/badges/indigophp-guardian-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/indigophp-guardian-doctrine/health.svg)](https://phpackages.com/packages/indigophp-guardian-doctrine)
```

###  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)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

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

Reliese Components for Laravel Framework code generation.

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

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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