PHPackages                             indigophp/fuel-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. [Framework](/categories/framework)
4. /
5. indigophp/fuel-doctrine

AbandonedArchivedFuel-package[Framework](/categories/framework)

indigophp/fuel-doctrine
=======================

Fuel Doctrine 2 integration

016PHP

Since Sep 21Pushed 11y ago1 watchersCompare

[ Source](https://github.com/indigophp-archive/fuel-doctrine)[ Packagist](https://packagist.org/packages/indigophp/fuel-doctrine)[ RSS](/packages/indigophp-fuel-doctrine/feed)WikiDiscussions develop Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Fuel Doctrine
=============

[](#fuel-doctrine)

[![Build Status](https://camo.githubusercontent.com/b41f2fcc8809471986256e88a88947b125fc0126050873f9e71360c8ee424ffc/68747470733a2f2f7472617669732d63692e6f72672f696e6469676f7068702f6675656c2d646f637472696e652e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/indigophp/fuel-doctrine)[![Latest Stable Version](https://camo.githubusercontent.com/34a44693b0eba68e4f7f89544b406e4e25f7a6608044cc9a88eae14876432ba9/68747470733a2f2f706f7365722e707567782e6f72672f696e6469676f7068702f6675656c2d646f637472696e652f762f737461626c652e706e67)](https://packagist.org/packages/indigophp/fuel-doctrine)[![Total Downloads](https://camo.githubusercontent.com/8bf7a924bb879ef83e3333a6abfd68817356998418a4c4fa03cc34f859c48aa8/68747470733a2f2f706f7365722e707567782e6f72672f696e6469676f7068702f6675656c2d646f637472696e652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/indigophp/fuel-doctrine)[![License](https://camo.githubusercontent.com/08efbe75f0fc4b3709fab1d271f65469265148bf3ca934e77a6ac84406545265/68747470733a2f2f706f7365722e707567782e6f72672f696e6469676f7068702f6675656c2d646f637472696e652f6c6963656e73652e706e67)](https://packagist.org/packages/indigophp/fuel-doctrine)[![Dependency Status](https://camo.githubusercontent.com/664a2f533330ebf13f67199ad57c304aa9ca26478b1a912ca20d5060c5be4890/687474703a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533663031636431313362623036303739383030303831352f62616467652e7376673f7374796c653d666c6174)](http://www.versioneye.com/user/projects/53f01cd113bb060798000815)

**This package is a wrapper around [doctrine/doctrine2](https://github.com/doctrine/doctrine2) package.**

Install
-------

[](#install)

Via Composer

```
{
    "require": {
        "indigophp/fuel-doctrine": "@stable"
    }
}
```

Usage
-----

[](#usage)

```
$manager = \Doctrine\Manager::forge('default');

$em = $manager->getEntityManager();
```

Configuration
-------------

[](#configuration)

To make it work, you need the following `doctrine` configuration.

```
	'dbal'                        => 'default',
	'proxy_dir'                   => '/tmp',
	'proxy_namespace'             => 'PrOxYnAmEsPaCe',
	'auto_generate_proxy_classes' => true,
	'mappings'                    => array(
		'mapping' => array(
			'type'   => 'xml',
			'dir'    => '/mypath',
			'prefix' => 'MyPrefix',
		),
	),
	'cache_driver'                => 'array',
```

You can also use the `Setup` class to auto configure the `Configuration` object.

```
	'dbal'            => 'default',
	'auto_config'     => true,
	'dev_mode'        => \Fuel::$env === \Fuel::DEVELOPMENT,
	'proxy_dir'       => '/tmp',
	'cache_driver'    => 'array',
```

### Multiple managers

[](#multiple-managers)

By default you have one manager (`default`). If you would like use multiple managers, you have to add a key `managers` to your doctrine config, and set your configurations there. You can also set global configurations in the config root. Make sure to set `auto_mapping` to `false`.

```
	'auto_mapping'    => false,
	'dbal'            => 'default',
	'managers'        => array(
		'default'   => array(),
		'aditional' => array()
	),
```

**Note:** This package uses [indigophp/fuel-dbal](https://github.com/indigophp/fuel-dbal) for connections. Check the package documentation.

Running `doctrine` commands
---------------------------

[](#running-doctrine-commands)

Doctrine comes with a CLI tool by default, however it is a bit hard use it the official way (`cli-config.php` in the project root folder). So I wrapped it in an `oil` command. It is working, but it is still just a hack ("oil" and "r" or "refine" are just removed from the argument list), so use it with caution.

Example:

```
oil r doctrine orm:schema-tool:drop --force
oil r doctrine orm:schema-tool:create
```

General syntax:

```
oil r doctrine [command]
```

If you want to use a specific Manager instance put a DB env var before the command:

```
DB=my_doctrine_instance oil r doctrine [command]
```

**Note:** Make sure the `doctrine` package is loaded in fuel otherwise the task will not work.

Testing
-------

[](#testing)

```
$ codecept run
```

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/indigophp/fuel-doctrine/blob/develop/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

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

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/indigophp/fuel-doctrine/blob/develop/LICENSE) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

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)

![](https://www.gravatar.com/avatar/1585b5a08e138e348f5b646231d0f16cb2eae06501fb9462bbc97a794d4de84a?d=identicon)[TamasBarta](/maintainers/TamasBarta)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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