PHPackages                             svp/yii2-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. svp/yii2-doctrine

ActiveYii-extension[Database &amp; ORM](/categories/database)

svp/yii2-doctrine
=================

Yii 2 extension wrapper to communicate with Doctrine 2.

7534[1 PRs](https://github.com/svp1989/yii2-doctrine/pulls)PHP

Since Mar 16Pushed 6y ago2 watchersCompare

[ Source](https://github.com/svp1989/yii2-doctrine)[ Packagist](https://packagist.org/packages/svp/yii2-doctrine)[ RSS](/packages/svp-yii2-doctrine/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-doctrine
=============

[](#yii2-doctrine)

Yii 2 extension wrapper to communicate with Doctrine 2.

Installation
------------

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require svp/yii2-doctrine

```

Usage
-----

[](#usage)

For connecting doctrine components insert in you **config** file

```
'components' => [
...
       'doctrine'  => [
            'class'    => 'yii\doctrine\components\DoctrineComponent',
            'isDev'    => true,            //for development
            'driver'   => 'pdo_mysql',     //database driver
            'user'     => 'user',          //database user
            'password' => 'password',      //password
            'host'     => 'localhost',
            'dbname'   => 'dbname',        //name database
            'entityPath' => [              //paths with you entity
                'backend/models',
                'frontend/models',
                'console/models',
                'common/models',
            ]
        ]
]
```

For using doctrine console add to you **config** file

```
'controllerMap' => [
        ....
        'doctrine' => [
            'class'     => 'yii\doctrine\console\DoctrineController',
        ]
    ]
]
```

and call **./yii doctrine**, if you need transfer option use option -o=option.
For example :
\--*create* table from entity **./yii orm:schema-tool:create**
\--*update* table from entity **./yii orm:schema-tool:update -o=--force**
\--*create* table from entity **./yii orm:schema-tool:drop -o=--dump-sql** etc.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/6221263?v=4)[svp123](/maintainers/svp123)[@svp123](https://github.com/svp123)

---

Tags

doctrine-extensionyii-doctrineyii2

### Embed Badge

![Health badge](/badges/svp-yii2-doctrine/health.svg)

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

###  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)
