PHPackages                             stargazer-team/yii-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. stargazer-team/yii-doctrine

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

stargazer-team/yii-doctrine
===========================

Yii3 integration Doctrine extension

2.1.5(3mo ago)194[1 issues](https://github.com/stargazer-team/yii-doctrine/issues)1BSD-3-ClausePHPPHP &gt;=8.1CI passing

Since May 6Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (12)Versions (15)Used By (1)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii3 Doctrine Extension
=======================

[](#yii3-doctrine-extension)

[![Latest Stable Version](https://camo.githubusercontent.com/c0c4d4e37ef081773fc72e731a07c9d408fdcff3f632aa8fc07070960584da16/68747470733a2f2f706f7365722e707567782e6f72672f7374617267617a65722d7465616d2f7969692d646f637472696e652f76)](https://packagist.org/packages/stargazer-team/yii-doctrine)[![Total Downloads](https://camo.githubusercontent.com/b7f3a8febaa9587dfa16c7a7a0ab671749c4facc9c986e4a96c35d3474428fc0/68747470733a2f2f706f7365722e707567782e6f72672f7374617267617a65722d7465616d2f7969692d646f637472696e652f646f776e6c6f616473)](https://packagist.org/packages/stargazer-team/yii-doctrine)[![Build status](https://github.com/stargazer-team/yii-doctrine/actions/workflows/php.yml/badge.svg)](https://github.com/stargazer-team/yii-doctrine/actions)[![static analysis](https://github.com/stargazer-team/yii-doctrine/workflows/static%20analysis/badge.svg)](https://github.com/stargazer-team/yii-doctrine/actions?query=workflow%3A%22static+analysis%22)[![type-coverage](https://camo.githubusercontent.com/22f084a70c8d26e345e9169cf7b734d69a9fb06d28815fb28f9135220c4ae5a3/68747470733a2f2f73686570686572642e6465762f6769746875622f7374617267617a65722d7465616d2f7969692d646f637472696e652f636f7665726167652e737667)](https://shepherd.dev/github/stargazer-team/yii-doctrine)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/):

```
composer require stargazer-team/yii-doctrine
```

Basic Usage
-----------

[](#basic-usage)

Configuration params doctrine: dbal, orm, migrations example config path [example.php](config/example.php)

### DBAL

[](#dbal)

Create database:

```
php yii doctrine:database:create
```

Drop database:

```
php yii doctrine:database:drop --if-exists --force
```

Dynamic create connection:

```
