fabiang / doctrine-dynamic-laminas
Laminas 绑定 for doctrine-dynamic
v2.0.0
2022-05-16 09:02 UTC
Requires
- php: ^7.4 || ~8.0.0 || ~8.1.0
- doctrine/doctrine-orm-module: ^3.0 || ^4.0 || ^5.1
- doctrine/orm: ^2.5
- fabiang/doctrine-dynamic: ^1.0 || ^2.0
- laminas/laminas-eventmanager: ^3.0
- laminas/laminas-modulemanager: ^2.9
- laminas/laminas-mvc: ^3.0
- laminas/laminas-servicemanager: ^3.0
Requires (Dev)
- laminas/laminas-coding-standard: ^2.3
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.23
Replaces
This package is auto-updated.
Last update: 2024-09-16 14:01:59 UTC
README
Laminas 绑定 for fabiang/doctrine-dynamic.
安装
新用户Composer?阅读介绍。运行以下Composer命令
$ composer require fabiang/doctrine-dynamic-laminas
配置
通过将其添加到config/application.config.php
来加载模块
return [ 'modules' => [ /** **/ 'Fabiang\DoctrineDynamic', ], ];
将额外的选项和关联配置到模块配置中(例如config/module.config.php
)
<?php namespace Mymodule; return [ /** **/ 'doctrine_dynamic' => [ \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' ] ] ] ] ] ], ] ];
开发
此库使用 PHPUnit 进行测试。
在 Github 上fork该项目并提交带有您更改的pull request。确保您没有在运行以下命令时破坏任何内容
composer install ./vendor/bin/phpunit
许可证
BSD-2-Clause。查看LICENSE.md。