Open croensch opened 9 years ago
Due to heavy use of singletons and statics in ZF1 the only way to achieve consistent state is to bootstrap everything before running application. Same holds true if Zf2for1 is used.
Idea of this package is to provide refactoring path to zf2 instead of complete rewrite. That means that zf1 model and various resources must be made available to zf2 application and that means zf1 must be bootstrapped.
The basic features mention
What if my ZF2 modules don't need this? I thought about bootstrapping zf2 first and all remaining resources only in the case that it makes a fallback to ZF1. To do that i had to make some modifications.
index.php
\Zf2for1_Resource_Zf2 called a blank
bootstrap()
before the fallback, based on a triggered zf2 event.\Zf2for1\Application\Zf2Bootstrap so i put it into the other event (and also moved the part with the frontcontroller).
I guess now even if a ZF2 module would need ZF1 resources it could just chain the call
bootstrap('X')->getResource('X')
while ZF1 modules can work as they were.Any good reasons against this?