This is an installment in an ongoing series of posts on ZF3 development status. It's been more than a month since the last update, and we've been quite busy with:
During the first week of March, we completed the forwards compatibility migrations of components. As a reminder, we were working on updating components that depend on any of:
to be forwards compatible with the version 3 releases of each. In particular, the first two have version 2 releases that allow developers to make their code forwards compatible with the version 3 releases, and we were doing precisely that with the various Zend Framework components. As of 2 March 2016, we completed this task — a major milestone in the ZF3 initiative!
The following component releases were made since the last blog update and mark the current stable versions that are forwards compatible with the v3 releases:
In addition to the migration changes, we made a number of other updates to zend-mvc, including:
MiddlewareListener, allowing routing to PSR-7 middleware in the MVC layer.
EventManagerAwareInterfaceinitializers; since shared managers are injected in
EventManagerinstances via the constructor in zend-eventmanager v3, the initializers needed changes in order to work with both v2 and v3.
AbstractController::getServiceLocator()now raises an
E_USER_DEPRECATEDnotice. zend-servicemanager v3 removes the
ServiceLocatorAwareInterface, and zend-mvc will remove the implementations with version 3. Users should start updating their controllers to accept dependencies via constructor injection.
The above are messaged in more detail in the zend-mvc migration guide.
One goal for zend-mvc is to reduce the number of dependencies. Much of the functionality within zend-mvc is not directly related to execution of the MVC, but rather integrating components. Typically this is done by either providing and wiring factories for components, or providing and/or wiring event listeners for components.
We already have functionality that allows doing these tasks via the zend-modulemanager component, which means we can expose components as application modules. However, this creates an installation issue: just like modules, you would need to:
To automate the second task, we developed zend-component-installer back in December. As part of the current milestones, we completed that component, by making the following changes:
config/application.config.php(vanilla zend-mvc application)
config/development.config.php(application using zend-development-mode)
config/config.php(for Expressive users using the expressive-config-manager)
We've become quite excited about the possibilities Composer plugins and installer scripts offer, and plan to leverage them as much as possible!
Several weeks ago, we created a detailed plan for the zend-mvc v3 refactor. The work is primarily around reducing the number of dependencies zend-mvc requires; the above work on the component installer directly enables these changes, but much more needs to be done.
Since we posted that, we've also started work on the various milestones it details. In particular, we've done the following:
prg()controller plugin. This is the first of several component plugins being developed.
As part of this effort, we are documenting migration steps needed by end-users, to ensure that developers will be able to update their applications once version 3 is tagged.
The documentation effort was put on the back-burner during these past few weeks so that we can focus on the development efforts. Regardless, we managed to publish 5 components to GitHub Pages:
Additionally, a number of contributors, and notably Frank Brückner, have been providing patches to resolve issues created following the automated documentation migration.
A fair number of issues and feature patches have been reported on the Diactoros (PSR-7), Stratigility (PSR-7 middleware foundation), and Expressive projects, and we had a short sprint to resolve these.
Responseclass less error-prone following calls to
end(). Additionally, it:
FinalHandler::setOriginalResponse()method, to allow injection after instantiation.
Throwableerrors in PHP 7 applications within the dispatcher.
InvalidMiddlewareExceptionthat is raised by
MiddlewarePipe::pipe()for non-callable middleware.
composer.jsonto allow installing zend-servicemanager v3, whoops v2, and ProxyManager v2.
Unlike previous posts, we are not detailing every component release this time; the sheer number of them (around 60!) would result in a very long read!
If you want to help:
Many thanks to all the contributors who have provided feedback, patches, reviews, or releases since the last update!
Subscribe to this blog via RSS.