This is an installment in an ongoing series of posts on ZF3 development status. In the last three weeks, we've done a lot:
- ~160 pull requests merged, and ~110 issues closed.
- Over 60 component releases.
- Completion of the zend-mvc version 3 refactors.
- All components are now forwards-compatible with existing v3 releases, including those that depend on zend-stdlib.
- Progress on the documentation initiatives, including 11 new components documented.
- Announcement of issue closures.
As of last week, however, we have completed all tasks related to the refactor! These include:
- a component installer Composer plugin, which will automatically inject installed components into application configuration as modules. (It is also forwards-compatible with upcoming Expressive releases!)
- console functionality as a separate component (zend-mvc-console).
- separation of controller plugins with additional dependencies into their own packages, including:
- separation of i18n integration into a separate component (zend-mvc-i18n).
- separation of the code for wiring zend-di into zend-servicemanager into a dedicated component (zend-servicemanager-di).
- removal of all factories and integrations with components that fall outside the core dependencies.
This latter required that we move the various factories, service integrations, and event listener wiring code into the components themselves. This affected eight components, though we ended up addressing another five components that were already defining factories for zend-servicemanager as well:
For each of these, we created two new classes in their defined namespaces,
Module. The first is an invokable class returning
configuration, which might include service configuration, plugin configuration,
Module is a class specific to the Zend Framework ecosystem, and returns
configuration, but, in several cases, also wired other code into the zend-mvc
workflow. All of the above components received new minor releases once these
were in place, and zend-mvc was updated to remove dependencies on them.
The core dependencies in zend-mvc are now:
Once we were done, the lines of code had dropped to approximately 25% of the size in the version 2 releases!
With the zend-mvc refactor complete, we decided to work on the skeleton application.
Feedback we've had includes:
- While having i18n support is interesting in terms of seeing how it's done, it's mostly worthless in the skeleton application. The provided translations are only valid for the home page shipped with the skeleton, which is replaced essentially 100% of the time with custom content. Additionally, it poses maintenance overhead with regards to reviewing and accepting new translations. Finally, with the split of zend-mvc-i18n, keeping it in meant adding additional dependencies which might never be used.
- Related, we've had a lot of folks indicate that they'd like an option for a minimal skeleton. Many developers don't want the i18n, console, forms, cache, logging, and other facilities, or want to pick and choose which ones they configure.
- As PSR-0 is deprecated, our skeleton should reflect PSR-4 for the default
- Related, we want to encourage using composer for all autoloading.
To get the ball rolling, I created a pull request proposing a streamlined skeleton. This has already generated a fair bit of discussion, and we have a number of new ideas we're going to investigate, including setting up Expressive-like installation questions to allow bringing in common features during the first install.
We also did some refactoring of the zend-json component. Several users have complained that it includes too much: the JSON-RPC functionality is not generally useful for those who only want JSON de/serialization, and the XML2JSON implementation is only needed by a subset of users.
As such, we split it into three:
- zend-json contains the JSON de/serialization logic only, starting with its v3 release.
- zend-json-server contains the JSON-RPC server implementation.
- zend-xml2json contains the XML2JSON implementation.
We'd like to thank Ali Bahman for his assistance with these changes!
This week, we discovered half-a-dozen components that declare a dependency on zend-stdlib, but which had not been updated to allow usage with zend-stdlib's v3 releases. As such, we quickly updated each to do so, releasing new maintenance releases when ready. These include:
With the MVC initiatives complete, we have begun working on the documentation in earnest again.
The first thing we did was recognize that while it's nice to be publishing the documentation, we really need mechanisms for navigating to other components. As such, we created a topnav button that, when clicked, fetches a list of components with documentation, and slides the list in from the top of the page.
We've also been either documenting components as we create them (see the MVC plugins and JSON changes, above), or publishing documentation as we create new releases on components we update. Since the last update, we've published documentation for the following components:
Many thanks to Frank Brückner for the copious documentation updates he's provided!
There's plenty left to do, however (32 components left at the time of writing). We've created a list of components and tasks to perform if you are interested in helping!
Last week, Gary Hockin posted to the ZF blog about a plan to perform housekeeping of issues posted against the main zendframework repository. The basic summary is: issues against the main ZF repository have been tagged as "To Be Closed", and will be closed in early May unless you comment on an issue and tag user @GeeH before 3rd May 2016.
Pull request and issue activity
As noted at the beginning of this post, we've done over 60 component releases since the last update (approximately four weeks ago). Notable amongst them:
- Zend Framework 1.12.18
- zend-json 3.0.0, which removes the JSON-RPC and XML2JSON functionality (as those are now in separate components)
which fixes a long-standing issue with localization of
NotEmptyvalidation messages generated for required inputs.
provides a security hardening patch for
Zend\Math\Rand, forcing usage of PHP 7's
random_int()when available, and requiring ircmaxell/RandomLib for earlier PHP versions.
- zend-session 2.7.0 updates the component to use ext/mongodb + the MongoDB PHP client library instead of ext/mongo, and adds session identifier validation by default.
Pgsqladapter to accept the
Zend\Db\Sql\Insertto properly manage arrays of column names when generating SQL INSERT statements; fixes an issue with how row counts were reported in
Oci8result sets; and updates the
IbmDb2adapter to allow
#characters in identifiers.
- zend-cache 2.7.0 offers a ton of new features, including a new APCu adapter, upgraded support for XCache and Redis, and numerous bugfixes.
zend-stdlib 2.7.7 and
fix declaration of
Zend\Json\Json::GLOB_BRACEwhen on systems based on non-gcc versions of glob.
Until next time
If you want to help:
- Help complete the documentation migration!
- Test the new skeleton and provide feedback.
- Review issues to be closed
- Search for help wanted or EasyFix issues (most of the latter are documentation).
Many thanks to all the contributors who have provided feedback, patches, reviews, or releases since the last update!