Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ install:
- composer show

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover ./build/clover.xml ; else ./vendor/bin/phpunit ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then php build/coverage-checker.php build/clover.xml 70 ; fi
- if [[ $CHECK_CS == 'true' ]]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/ ./config/ ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
Expand Down
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Doctrine 2 ORM Module for Zend Framework 2
# Doctrine 2 ORM Module for Zend Framework

[![Master branch build status](https://secure.travis-ci.org/doctrine/DoctrineORMModule.png?branch=master)](http://travis-ci.org/doctrine/DoctrineORMModule) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/badges/quality-score.png?s=1e2a047fb1bb0f66937bcbc3a61f960c8089c835)](https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/) [![Code Coverage](https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/badges/coverage.png?s=377656ded5ffaaf4635acfb26729caa212fb5d76)](https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/) [![Latest Stable Version](https://poser.pugx.org/doctrine/doctrine-orm-module/v/stable.png)](https://packagist.org/packages/doctrine/doctrine-orm-module) [![Total Downloads](https://poser.pugx.org/doctrine/doctrine-orm-module/downloads.png)](https://packagist.org/packages/doctrine/doctrine-orm-module)

DoctrineORMModule integrates Doctrine 2 ORM with Zend Framework 2 quickly and easily.
DoctrineORMModule integrates Doctrine 2 ORM with Zend Framework quickly and easily.

- Doctrine 2 ORM support
- Multiple ORM entity managers
Expand All @@ -15,7 +15,7 @@ Installation of this module uses composer. For composer documentation, please re
[getcomposer.org](http://getcomposer.org/).

```sh
php composer.phar require doctrine/doctrine-orm-module
composer require doctrine/doctrine-orm-module
```

Then add `DoctrineModule` and `DoctrineORMModule` to your `config/application.config.php` and create directory
Expand All @@ -31,30 +31,30 @@ configuration for each of your entities namespaces:

```php
<?php
return array(
'doctrine' => array(
'driver' => array(
return [
'doctrine' => [
'driver' => [
// defines an annotation driver with two paths, and names it `my_annotation_driver`
'my_annotation_driver' => array(
'my_annotation_driver' => [
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(
'paths' => [
'path/to/my/entities',
'another/path'
),
),
'another/path',
],
],

// default metadata driver, aggregates all other drivers into a single one.
// Override `orm_default` only if you know what you're doing
'orm_default' => array(
'drivers' => array(
'orm_default' => [
'drivers' => [
// register `my_annotation_driver` for any entity under namespace `My\Namespace`
'My\Namespace' => 'my_annotation_driver'
)
)
)
)
);
'My\Namespace' => 'my_annotation_driver',
],
],
],
],
];
```

## Connection settings
Expand All @@ -63,23 +63,23 @@ Connection parameters can be defined in the application configuration:

```php
<?php
return array(
'doctrine' => array(
'connection' => array(
return [
'doctrine' => [
'connection' => [
// default connection name
'orm_default' => array(
'orm_default' => [
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'params' => [
'host' => 'localhost',
'port' => '3306',
'user' => 'username',
'password' => 'password',
'dbname' => 'database',
)
)
)
),
);
],
],
],
],
];
```

#### Full configuration options
Expand Down
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"require-dev": {
"phpunit/phpunit": "^5.6.0",
"squizlabs/php_codesniffer": "^2.6.2",
"squizlabs/php_codesniffer": "^2.7",
"doctrine/data-fixtures": "^1.2.1",
"doctrine/migrations": "^1.4.1",
"zendframework/zend-console": "^2.6",
Expand All @@ -73,5 +73,15 @@
"psr-0": {
"DoctrineORMModuleTest\\": "tests/"
}
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --coverage-clover build/clover.xml"
}
}
Loading