PHPackages                             laravel-doctrine/fluent - 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. laravel-doctrine/fluent

ActiveLibrary[Database &amp; ORM](/categories/database)

laravel-doctrine/fluent
=======================

A fluent PHP mapping driver for Doctrine2.

3.0.0(5mo ago)43447.2k↓57.9%28[8 issues](https://github.com/laravel-doctrine/fluent/issues)[2 PRs](https://github.com/laravel-doctrine/fluent/pulls)12MITPHPPHP ^8.1CI failing

Since Jan 30Pushed 5mo ago6 watchersCompare

[ Source](https://github.com/laravel-doctrine/fluent)[ Packagist](https://packagist.org/packages/laravel-doctrine/fluent)[ RSS](/packages/laravel-doctrine-fluent/feed)WikiDiscussions 3.0.x Synced 2d ago

READMEChangelog (10)Dependencies (11)Versions (27)Used By (12)

Fluent Mapping Driver
=====================

[](#fluent-mapping-driver)

[![](https://cloud.githubusercontent.com/assets/7728097/12727235/4f6ad3fa-c91c-11e5-9932-f0be9b473fa1.jpg)](https://cloud.githubusercontent.com/assets/7728097/12727235/4f6ad3fa-c91c-11e5-9932-f0be9b473fa1.jpg)

[![GitHub release](https://camo.githubusercontent.com/9121f4422f66a92fed0e31c66b0e425f3d51f97938a5b1a7f8895bf3c10f0de3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c61726176656c2d646f637472696e652f666c75656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-doctrine/fluent)[![Packagist](https://camo.githubusercontent.com/880e57c5a7d721744d58a99ff964b863a1faf6695284b47ce898e1a1f2d25ca8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d646f637472696e652f666c75656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-doctrine/fluent)[![License](https://camo.githubusercontent.com/37bb82b367a425e67653583f3e849bd94ea216896e780ecb30df622c03de938b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c2d646f637472696e652f666c75656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-doctrine/fluent)[![Github actions](https://github.com/laravel-doctrine/fluent/workflows/CI/badge.svg?branch=1.x)](https://github.com/laravel-doctrine/fluent/actions?query=workflow%3ACI+branch%3A1.x)

*A fluent mapping driver for Doctrine3*

```
composer require laravel-doctrine/fluent

```

This mapping driver allows you to manage your mappings in an Object Oriented approach, separating your entities from your mapping configuration without the need for configuration files like XML or YAML. This is done by implementing the `LaravelDoctrine\Fluent\Mapping` interface, or extending the abstract classes provided with this package for an easier use: `LaravelDoctrine\Fluent\EntityMapping`, `LaravelDoctrine\Fluent\EmbeddableMapping` or `MappedSuperClassMapping`.

This package provides a fluent Builder over Doctrine's `ClassMetadataBuilder`, aimed at easing usage of Doctrine's mapping concepts in Laravel. The builder adds syntax sugar and implements the same grammar that you might use in Laravel migrations.

```
class ScientistMapping extends EntityMapping
{
    /**
     * Returns the fully qualified name of the class that this mapper maps.
     *
     * @return string
     */
    public function mapFor()
    {
        return Scientist::class;
    }

    /**
     * Load the object's metadata through the Metadata Builder object.
     *
     * @param Fluent $builder
     */
    public function map(Fluent $builder)
    {
        $builder->increments('id');
        $builder->embed(Name::class, 'name');

        $builder->hasMany(Theory::class, 'theories')->ownedBy('scientist');
    }
}
```

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance69

Regular maintenance activity

Popularity50

Moderate usage in the ecosystem

Community37

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~34 days

Total

25

Last Release

150d ago

Major Versions

1.x-dev → 2.0.02025-09-21

2.x-dev → 3.0.02026-02-04

PHP version history (5 changes)1.0.0PHP &gt;=5.5.0

1.2.0PHP &gt;=7

1.2.1PHP ^7.2|^8.0

1.3.1PHP ^7.2|^8.0|^8.1

2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/aba65a2b4ccb2b2d971b8da88a4916c4d9d4d4fc4dc3944a7d6931947863b52e?d=identicon)[patrickbrouwers](/maintainers/patrickbrouwers)

![](https://avatars.githubusercontent.com/u/41789?v=4)[Einar Gangsø](/maintainers/eigan)[@eigan](https://github.com/eigan)

![](https://www.gravatar.com/avatar/01591fdbaebb312b9f302030eca542bcdbbed34126b8a49c47d510fb850f9f10?d=identicon)[LaravelDoctrine](/maintainers/LaravelDoctrine)

![](https://www.gravatar.com/avatar/2d2603aa8449b6428f1f47191f1dfb4adfbdfaf30159d84267ae13f14344601c?d=identicon)[vladyslavstartsev](/maintainers/vladyslavstartsev)

---

Top Contributors

[![patrickbrouwers](https://avatars.githubusercontent.com/u/7728097?v=4)](https://github.com/patrickbrouwers "patrickbrouwers (105 commits)")[![guiwoda](https://avatars.githubusercontent.com/u/1625545?v=4)](https://github.com/guiwoda "guiwoda (93 commits)")[![DudeMason](https://avatars.githubusercontent.com/u/57735637?v=4)](https://github.com/DudeMason "DudeMason (31 commits)")[![eigan](https://avatars.githubusercontent.com/u/41789?v=4)](https://github.com/eigan "eigan (16 commits)")[![TomHAnderson](https://avatars.githubusercontent.com/u/493920?v=4)](https://github.com/TomHAnderson "TomHAnderson (11 commits)")[![adrorocker](https://avatars.githubusercontent.com/u/1872940?v=4)](https://github.com/adrorocker "adrorocker (5 commits)")[![dpgover](https://avatars.githubusercontent.com/u/5347955?v=4)](https://github.com/dpgover "dpgover (5 commits)")[![terence-zencontrol](https://avatars.githubusercontent.com/u/243891867?v=4)](https://github.com/terence-zencontrol "terence-zencontrol (2 commits)")[![vv12131415](https://avatars.githubusercontent.com/u/17382248?v=4)](https://github.com/vv12131415 "vv12131415 (2 commits)")[![hiddeco](https://avatars.githubusercontent.com/u/10063039?v=4)](https://github.com/hiddeco "hiddeco (1 commits)")[![gordinskiy](https://avatars.githubusercontent.com/u/72280830?v=4)](https://github.com/gordinskiy "gordinskiy (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")[![dpslwk](https://avatars.githubusercontent.com/u/234460?v=4)](https://github.com/dpslwk "dpslwk (1 commits)")

---

Tags

laraveldatabaseormdoctrinefluentdata mappermappingsmapping driver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-doctrine-fluent/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k300.5M7.5k](/packages/doctrine-orm)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8465.5M96](/packages/laravel-doctrine-orm)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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