PHPackages                             ariga/atlas-provider-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. ariga/atlas-provider-doctrine

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

ariga/atlas-provider-doctrine
=============================

Atlas provider for PHP doctrine ORM

v4.0.5(11mo ago)2175Apache-2.0PHP

Since Mar 24Pushed 11mo ago6 watchersCompare

[ Source](https://github.com/ariga/atlas-provider-doctrine)[ Packagist](https://packagist.org/packages/ariga/atlas-provider-doctrine)[ RSS](/packages/ariga-atlas-provider-doctrine/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (16)Used By (0)

atlas-provider-doctrine
=======================

[](#atlas-provider-doctrine)

Use [Atlas](https://atlasgo.io/) with [Doctrine](https://www.doctrine-project.org/) to manage your database schema as code. By connecting your Doctrine models to Atlas, you can define and edit your schema directly in PHP. Atlas will then automatically plan and apply database schema migrations for you, eliminating the need to write migrations manually.

Atlas brings automated CI/CD workflows to your database, along with built-in support for [testing](https://atlasgo.io/testing/schema), [linting](https://atlasgo.io/versioned/lint), schema [drift detection](https://atlasgo.io/monitoring/drift-detection), and [schema monitoring](https://atlasgo.io/monitoring). It also allows you to extend Doctrine with advanced database objects such as triggers, row-level security, and custom functions that are not supported natively.

### Use-cases

[](#use-cases)

1. [**Declarative migrations**](https://atlasgo.io/declarative/apply) - Use the Terraform-like `atlas schema apply --env doctrine` command to apply your Doctrine schema to the database.
2. [**Automatic migration planning**](https://atlasgo.io/versioned/diff) - Use `atlas migrate diff --env doctrine` to automatically plan database schema changes and generate a migration from the current database version to the desired version defined by your Doctrine schema.

### Requirements

[](#requirements)

- [DBAL](https://www.doctrine-project.org/projects/doctrine-dbal/en/4.0/index.html) - `composer require doctrine/dbal:^4`

### Installation

[](#installation)

Install Atlas from macOS or Linux by running:

```
curl -sSf https://atlasgo.sh | sh
```

See [atlasgo.io](https://atlasgo.io/getting-started#installation) for more installation options.

Install the provider by running:

```
composer require ariga/atlas-provider-doctrine:^4
```

#### Doctrine Console Command

[](#doctrine-console-command)

If all of your Doctrine entities exist under single directory, you can add the atlas-provider command to the Doctrine Console file:

```
#!/usr/bin/env php
