title: Step by step migration from Zend Framework 1 to 2
body: <p>I have to migrate an application from Zend Framework 1.12.0 to version 2. There seem to be <a href="http://zend-framework-community.634137.n4.nabble.com/ZF1-gt-ZF2-migration-guide-td4656239.html">no migration guides yet</a>. I have already studied ZF2 coding conventions and I adopted dependency injection (Zend\Di) and PHP 5.3 namespaces. My goal is to refactor my ZF1 application into a ZF2 module. </p>
  
  <p>Question: Is it possible to proceed step-by-step with an at least partly <em>working application after every step</em> and <em>avoid huge refactoring steps</em>? If yes, what are the steps?</p>
  
  <p>Here's my idea of such a step-by-step migration, but I don't know if I end up with a working application after every step:</p>
  
  <ol>
  <li>Start by setting up the <a href="https://github.com/zendframework/ZendSkeletonApplication">ZF2 Skeleton Application</a></li>
  <li><a href="http://packages.zendframework.com/docs/latest/manual/en/user-guide/modules.html">Set up a new module</a> (MyApp) and reorganize the contents of my ZF1 application into the MyApp module folder structure. Then set up very basic configuration and bootstrapping and migrate the IndexController by extending it from the ZF2 AbstractActionController. The models (Zend_Db) and views (Zend_View) will be migrated later. The goal here is to have a working IndexController::indexAction which doesn't have many dependencies.</li>
  <li>Set up more configuration and bootstrapping (Routing, Translate, Locale, Cache, Db, Acl, ViewHelpers, ...). I'd like to set up the ZF1 versions of these components first and migrate them later one by one.</li>
  <li>Migrate the other controllers and set up dependency injection into the controllers either with Zend\Di or by <a href="http://www.zfdaily.com/2012/07/getting-dependencies-into-zf2-controllers/">using the ServiceManager</a>.</li>
  <li>Set up automatic deployment by making the old <a href="http://www.phing.info/">phing</a> scripts work with the new directory structure.</li>
  <li>Migrate the views (including helpers) and forms to ZF2.</li>
  <li>Migrate the models (from Zend_Db either to ZF2 Zend\Db or to Doctrine).</li>
  <li>Migrate other ZF1 components one by one (Translate, Locale, Cache, Acl, ...).</li>
  <li>Refactoring rehab and long holiday.</li>
  </ol>
  
  <p>However, I will have a workin application after every step only if certain ZF2 components work together with ZF1 components. I have no idea if it's e.g. possible to use ZF1 views (and view helpers) with ZF2 controllers.</p>