With Expressive 3 complete, we were able to turn our sights on another important initiative: PHP 7.2 support across all Zend Framework components.
PHP 7.2 was released on 30 November 2017, and includes a number of improvements including the ability to use abstract methods to override abstract methods, parameter type widening, and extension of the object type. Additionally, it deprecates the create_function() and each() functions, the __autoload() mechanism, and several other items.
What We Did
We conducted an audit of all Zend Framework repositories to identify those that had failing test suites under PHP 7.2. We found a number of problems:
- Usage of
create_function() - Usage of curly-brace syntax for accessing string and array elements (now deprecated in PHP 7.4)
- Test suites that were asserting exceptions via doc-blocks instead of the
expectException()API - Various other minor deprecation notices
Results
We updated over 60 components to address PHP 7.2 compatibility. In many cases, we also took the opportunity to clean up the code, improve test coverage, and update documentation.
All Zend Framework components now support PHP 7.2 as a minimum version for new releases, ensuring you can run your applications on the latest stable PHP release.
Staying current with PHP releases is critical for security, performance, and access to new language features. We encourage all teams to plan their PHP version upgrade roadmap proactively.