https://github.com/fabiang/doctrine-dynamic-laminas
Laminas binding for doctrine-dynamic
https://github.com/fabiang/doctrine-dynamic-laminas
doctrine laminas laminas-module laminas-mvc php
Last synced: 7 months ago
JSON representation
Laminas binding for doctrine-dynamic
- Host: GitHub
- URL: https://github.com/fabiang/doctrine-dynamic-laminas
- Owner: fabiang
- License: other
- Created: 2021-01-13T16:12:45.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-05-16T09:07:37.000Z (over 3 years ago)
- Last Synced: 2024-09-21T11:55:15.622Z (about 1 year ago)
- Topics: doctrine, laminas, laminas-module, laminas-mvc, php
- Language: PHP
- Homepage:
- Size: 119 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# fabiang/doctrine-dynamic-laminas
Laminas binding for [fabiang/doctrine-dynamic](https://github.com/fabiang/doctrine-dynamic).
[](https://packagist.org/packages/fabiang/doctrine-dynamic-laminas)
[](https://packagist.org/packages/fabiang/doctrine-dynamic-laminas)
[](https://packagist.org/packages/fabiang/doctrine-dynamic-laminas)
[](https://github.com/fabiang/doctrine-dynamic-laminas/actions/workflows/ci.yml)
[](https://scrutinizer-ci.com/g/fabiang/doctrine-dynamic-laminas/?branch=develop)
[](https://scrutinizer-ci.com/g/fabiang/doctrine-dynamic-laminas/?branch=develop)## Installation
New to Composer? Read the [introduction](https://getcomposer.org/doc/00-intro.md#introduction). Run the following Composer command:
```console
$ composer require fabiang/doctrine-dynamic-laminas
```## Configuration
Load the module by adding it to `config/application.config.php`:
```php
return [
'modules' => [
/** **/
'Fabiang\DoctrineDynamic',
],
];
```Configure extra options and associations into your module configuration (e.g. `config/module.config.php`):
```php
[
\Mymodule\Entity\Customer::class => [
'options' => [
'repository' => \Mymodule\Repository\CustomerRepository::class,
],
'fields' => [
'fieldname' => [
'products' => [
'oneToMany' => [
[
'targetEntity' => \Mymodule\Entity\Customer::class,
'mappedBy' => 'customer',
]
]
]
]
]
],
\Mymodule\Entity\Products::class => [
'fields' => [
'customer' => [
'manyToOne' => [
[
'targetEntity' => \Mymodule\Entity\Products::class,
'inversedBy' => 'products',
'joinColumns' => [
'name' => 'customer_id',
'referencedColumnName' => 'id'
]
]
]
]
]
],
]
];
```## Development
This library is tested with [PHPUnit](https://phpunit.de/).
Fork the project on Github and send an pull request with your changes.
Make sure you didn't break anything with running the following commands:```console
composer install
./vendor/bin/phpunit
```## License
BSD-2-Clause. See the [LICENSE.md](LICENSE.md).