定制 fmasa/doctrine-nullable-embeddables 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fmasa/doctrine-nullable-embeddables

最新稳定版本:1.0.1

Composer 安装命令:

composer require fmasa/doctrine-nullable-embeddables

包简介

Mechanism for nullable embeddables in Doctrine 2.5+

README 文档

README

Build Status Coverage Status

This package serves as workaround for Doctrine's lack of support of nullable embeddables due to implementation of embeddables in Doctrine 2.5+ For more informations about the issue see doctrine/doctrine2.

Installation

The best way to install fmasa/doctrine-yaml-annotations is using Composer:

$ composer require fmasa/doctrine-nullable-embeddables

There are several conditions that has to be met:

  • Property with nullable embeddable must use Fmasa\DoctrineNullableEmbeddables\Annotations\Nullable annotation.
  • Every property in nullable embeddable must be nullable (or must use Nullable annotation if it's embeddable)

Now all you have to do is register Fmasa\DoctrineNullableEmbeddables\Subscriber and you have nullable embeddables working:

/* @var $annotationReader Doctrine\Common\Annotations\Reader */
/* @var $em Doctrine\ORM\EntityManager */

$evm->addEventSubscriber(new Fmasa\DoctrineNullableEmbeddables\Subscriber($annotationReader));

But I'm using YAML for mapping!

See fmasa/doctrine-yaml-annotations to make extensions like this work with YAML mapping.

统计信息

  • 总下载量: 25.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-04