api-skeletons/zf-doctrine-module-zend-hydrator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

api-skeletons/zf-doctrine-module-zend-hydrator

最新稳定版本:1.0.3

Composer 安装命令:

composer require api-skeletons/zf-doctrine-module-zend-hydrator

包简介

Corrects DoctrineModule classes to use zend-hydrator

README 文档

README

Total Downloads

** This is a Patch Repository **

Since the zendframework/zend-stdlib hydrators were moved into their own repository, zendframework/zend-hydrator, the DoctrineModule repository has not been updated to correctly use the new library. Through many discussions on the issue @doctrineorm continues to maintain they are in line with zendframework/zend-hydrator because, very unusually, the new library was written to be backwards compatible with zendframework/zend-stdlib but that backwards compatibility was removed from zend-hydrator in later versions leaving developers who want to use Doctrine in their projects which allow for custom hydrators out on a limb.

This library overrides the files from DoctrineModule which are broken because they still reference zendframework/zend-stdlib for their hydrators.

Discussion on this issue:

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.

$ php composer.phar require api-skeletons/zf-doctrine-module-zend-hydrator ^1.0

Inside your composer.json file this library must be included before doctrine/doctrine-module. This ordering allows classes from this repository to override the DoctrineModule classes which are broken.

Installation Warnings

You may receive the following warnings. These are to be expected and are not a cause for concern.

Warning: Ambiguous class resolution, "DoctrineModule\Stdlib\Hydrator\DoctrineObject" was found in both "Projects/phpro/zf-doctrine-hydration-module/vendor/api-skeletons/zf-doctrine-module-zend-hydrator/src/DoctrineObject.php" and "/Projects/phpro/zf-doctrine-hydration-module/vendor/doctrine/doctrine-module/src/DoctrineModule/Stdlib/Hydrator/DoctrineObject.php", the first will be used.
Warning: Ambiguous class resolution, "DoctrineModule\Stdlib\Hydrator\Filter\PropertyName" was found in both "/Projects/phpro/zf-doctrine-hydration-module/vendor/api-skeletons/zf-doctrine-module-zend-hydrator/src/Filter/PropertyName.php" and "/Projects/phpro/zf-doctrine-hydration-module/vendor/doctrine/doctrine-module/src/DoctrineModule/Stdlib/Hydrator/Filter/PropertyName.php", the first will be used.
Warning: Ambiguous class resolution, "DoctrineModule\Stdlib\Hydrator\Strategy\AbstractCollectionStrategy" was found in both "/Projects/phpro/zf-doctrine-hydration-module/vendor/api-skeletons/zf-doctrine-module-zend-hydrator/src/Strategy/AbstractCollectionStrategy.php" and "/Projects/phpro/zf-doctrine-hydration-module/vendor/doctrine/doctrine-module/src/DoctrineModule/Stdlib/Hydrator/Strategy/AbstractCollectionStrategy.php", the first will be used.

When to use this Patch Repository

If you are using custom hydrators for your entities and you see errors like the following, this repository will correct them.

Argument 2 passed to Zend\Stdlib\Hydrator\AbstractHydrator::addStrategy() must be an instance of Zend\Stdlib\Hydrator\Strategy\StrategyInterface ...

This is a Patch Repository

If you would like to be involved in the conversation at DoctrineModule to help get zendframework/zend-hydrator implemented correctly in @doctrineorm repository you may contribute to the discussions linked above.

Appreciation

Finding this patch would not have been possible without the constant support of Toon Verwerft and his zf-doctrine-hydration-module. It took nearly six months to find a solution and he supported my efforts the whole time. Thank you Toon!

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-12