2017 © Pedro Peláez
 

library zf-doctrine-module-zend-hydrator

Corrects DoctrineModule classes to use zend-hydrator

image

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

Corrects DoctrineModule classes to use zend-hydrator

  • Friday, June 24, 2016
  • by tom_anderson
  • Repository
  • 1 Watchers
  • 3 Stars
  • 53,605 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 4 Versions
  • 13 % Grown

The README.md

DoctrineModule zend-hydrator

Total Downloads, (*1)

** This is a Patch Repository **, (*2)

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., (*3)

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

Discussion on this issue: * Jan 30, 2016: https://github.com/doctrine/DoctrineModule/pull/548 * Apr 7, 2016: https://github.com/doctrine/DoctrineModule/pull/558#issuecomment-207212246, (*5)

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org., (*6)

$ 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., (*7)

Installation Warnings

You may receive the following warnings. These are to be expected and are not a cause for concern., (*8)

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., (*9)

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., (*10)

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!, (*11)

The Versions

24/06 2016

dev-master

9999999-dev

Corrects DoctrineModule classes to use zend-hydrator

  Sources   Download

MIT

The Requires

 

by Tom H Anderson

12/06 2016

1.0.0

1.0.0.0

Corrects DoctrineModule classes to use zend-hydrator

  Sources   Download

MIT

The Requires

 

by Tom H Anderson

12/06 2016

0.1.1

0.1.1.0

Corrects DoctrineModule classes to use zend-hydrator

  Sources   Download

MIT

The Requires

 

by Tom H Anderson

12/06 2016

0.1.0

0.1.0.0

Corrects DoctrineModule classes to use zend-hydrator

  Sources   Download

MIT

The Requires

 

by Tom H Anderson