An open API service indexing awesome lists of open source software.

https://github.com/lamansky/doctrine

A collection of classes useful in almost any project that uses the Doctrine ORM.
https://github.com/lamansky/doctrine

Last synced: 2 months ago
JSON representation

A collection of classes useful in almost any project that uses the Doctrine ORM.

Awesome Lists containing this project

README

          

# Doctrine Utilities

A collection of utility classes for the [Doctrine](https://www.doctrine-project.org/projects/orm.html) ORM (Object Relational Mapper).

## Installation

With [Composer](http://getcomposer.org) installed on your computer and initialized for your project, run this command in your project’s root directory:

```bash
composer require lamansky/doctrine
```

Requires PHP 7.4 or above.

You don’t need to install Doctrine2 separately. It will be bundled with this package.

## Classes

The library contains two classes that are useful for almost any Doctrine project: `ProjectEntityManager` and `UTCDateTimeType`.

### ProjectEntityManager

An abstract EntityManagerDecorator that automatically namespaces your Entity class names. To use, first create a class for your project that extends `ProjectEntityManager` and defines the class namespace prefixes:

```php