Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diablomedia/doctrine1-bundle
Doctrine1 Bundle for Symfony
https://github.com/diablomedia/doctrine1-bundle
Last synced: 5 days ago
JSON representation
Doctrine1 Bundle for Symfony
- Host: GitHub
- URL: https://github.com/diablomedia/doctrine1-bundle
- Owner: diablomedia
- License: mit
- Created: 2021-04-16T20:21:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T20:19:29.000Z (4 months ago)
- Last Synced: 2024-11-18T07:58:29.868Z (about 1 month ago)
- Language: PHP
- Size: 55.7 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Doctrine1 Bundle
[![Build](https://github.com/diablomedia/doctrine1-bundle/workflows/Build/badge.svg?event=push)](https://github.com/diablomedia/doctrine1-bundle/actions?query=workflow%3ABuild+event%3Apush)
[![Latest Stable Version](https://poser.pugx.org/diablomedia/doctrine1-bundle/v/stable)](https://packagist.org/packages/diablomedia/doctrine1-bundle)
[![Total Downloads](https://poser.pugx.org/diablomedia/doctrine1-bundle/downloads)](https://packagist.org/packages/diablomedia/doctrine1-bundle)
[![License](https://poser.pugx.org/diablomedia/doctrine1-bundle/license)](https://packagist.org/packages/diablomedia/doctrine1-bundle)Symfony Bundle for Doctrine1 ORM
This is heavily based on the Symfony/Doctrine DoctrineBundle (https://github.com/doctrine/DoctrineBundle) but adapted to work with Doctrine1. This bundle allows you to configure Doctrine1 through Symfony's configuration and also adds a section to the Symfony profiler/debug toolbar so you can view query information in the same way you would with the DoctrineBundle.
## Installation
Install using composer:
```
composer require diablomedia/doctrine1-bundle
```While this bundle should work with the original Doctrine1 library, we recommend using our fork that is better tested against recent versions of PHP.
```
composer require diablomedia/doctrine1
```## Configuration
Enable the Bundle in Symfony:
```php
['all' => true],
// ...
];
```To configure your database connection, create a `doctrine1.yaml` file in your `config/packages` folder with the necessary connection credentials, here's a sample for mysql:
```yaml
doctrine1:
default_connection: writer
connections:
writer:
url: '%env(resolve:WRITE_DATABASE_URL)%'
cache_class: 'Doctrine_Cache_Array'
enable_query_cache: true
enable_result_cache: true
reader:
url: '%env(resolve:READ_DATABASE_URL)%'
cache_class: 'Doctrine_Cache_Array'
enable_query_cache: true
enable_result_cache: true
```