The Zend Framework blog has a tutorial they've posted showing you how to migrate up to Zend Expressive v2.0 from a v1.x application and some of the things that could break along the way.
Last week, we released Expressive 2. A new major version implies breaking changes, which often poses a problem when migrating. That said, we did a lot of work behind the scenes to try and ensure that migrations can happen without too much effort, including providing migration tools to ease the transition.In this tutorial, we will detail migrating an existing Expressive application from version 1 to version 2.
Using this repository for a testbed, they walk through the steps for the update:
- Creating a migration branch
- Updating dependencies
- using the zendframework/zend-expressive-tooling to aid in the migration
- scanning your code to find possible breaking locations
- moving over to the programmatic pipeline structure
They also include some bonus information covering self-invoking functions, the zend-config-aggregator and development mode. The post ends with the updates you'll need to make to middleware to implement the http-interop/http-middleware MiddlewareInterface
.