PHPackages                             zored/zf2-to-3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zored/zf2-to-3

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zored/zf2-to-3
==============

Hacks for migrating from ZF2 to ZF3.

1.0(8y ago)011MITPHPPHP &gt;=5.6CI failing

Since Jan 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/zored/zf2-to-3)[ Packagist](https://packagist.org/packages/zored/zf2-to-3)[ RSS](/packages/zored-zf2-to-3/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (2)Used By (0)

ZF2 to 3
========

[](#zf2-to-3)

[![Build Status](https://camo.githubusercontent.com/c0c9bf346bb05de3d00545a0eddb0babe6749d6e7557059226f72b3131f65353/68747470733a2f2f7472617669732d63692e6f72672f7a6f7265642f7a66322d746f2d332e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zored/zf2-to-3)[![Coverage Status](https://camo.githubusercontent.com/67c7ab954f47742f03506cb29c60d57b8849ba62bd648791c432a91e2bd35b6c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7a6f7265642f7a66322d746f2d332f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/zored/zf2-to-3?branch=master)

Hacks for migrating from ZF2 to ZF3.

Why?
----

[](#why)

To fast-fix your code before fully moving to ZF3.

How?
----

[](#how)

- `use \ZF2TO3\ZF2To3AbstractFactoryTrait;` in abstract factories.
- `use \ZF2TO3\ZF2To3FactoryTrait;` in factories.
- `use \ZF2TO3\ZF2To3ControllerTrait;` in controller itself if it depends on service locator.
- `use \ZF2TO3\ZF2To3ServiceLocatorAwareTrait;` and custom constructor to [get rid of `ServiceLocatorAware`](https://docs.zendframework.com/zend-mvc/migration/to-v3-0/#servicelocatoraware-initializers).
- Change controller configurations: ```
