This repository was created way back when PSR-7 wasn't a thing. I would advise you to use PSR-7 as intermediate request format. Most stack middleware is already available for PSR-7.
The most common PSR-7 implementation can be found here. After that you should search for bridges to make it compatible with your framework if it isn't already.
This project runs a ZF2 project within the Symfony Http Foundation wich is even more fun when Stack comes into the picture.
Install Zend Framework using composer and simply add the require:
"reenl/stack-zf2": "dev-master"
. Then run composer update
.
Please take a look at [QUICKSTART.md] (QUICKSTART.md) for a more detailed description.
Because it can be done. I wanted to investigate how flexible ZF2 is versus SF. It helped me understand the inner workings of Zend Framework.
However it can be useful in several other cases:
- Gracefully migrate from Zend Framework to Symfony or the other way around.
- Ability to use (hopefully all) the stack middlewares.
- Find bugs in ZF2.
- Find out how to handle chdir, probably a setter on our kernel. (Please twitter me if you know the dependencies for chdir.)
- Test cases.
- Test compatibility other stack components.
Find out what to do with Request::getBasePath. Hardcoded usage in some helper.Conversion from Symfony to Zend Request is via toString.Try to make ZF throw exceptions instead of an error page when $catch is false.
- Application must be bootstrapped before calling
::handle
. - The request object can not be used during bootstrap, because the request that is going to be handled is not known when bootstrapping.
$_ENV
and$_FILES
are not (yet) supported.
- Open a ticket
- twitter: https://twitter.com/justreenl
- Optional: create an issue to notify me what you are doing
- Fork
- Improve
- PR