XenForo has a long history with Zend Framework starting with our usage of some parts of the Zend Framework dating all the way back to XenForo 1.0 and, even now, in XenForo 2.x we still use some specific components including some related to processing incoming mail and reading/writing RSS feeds.
However, the leadership structure of Zend Framework has undergone some changes in recent years and it has now gone through its most significant change, yet:
Put simply, Zend Framework has now become Laminas Project - an open source and community-supported project which aims to continue the work started in Zend Framework.
Because we still intend to use the aforementioned components going forward, as they are generally robust and well supported, we have decided that in XenForo 2.2 we will migrate the Zend Framework components we use to use the Laminas Project equivalents.
While this is actually a relatively straight forward change, this does potentially impact add-ons. There are two distinct ways this may affect your add-on code:
If you have code which falls into the situation mentioned in
If you have a significant reliance on Zend/Laminas code in your add-on, you may wish to follow their migration guide which does some of the heavy lifting for you automatically:
If you have code which falls into the situation mentioned in
As a specific example of the type of change required in XenForo 2.2, please look at this example from XenForo Media Gallery related to rendering RSS feeds.
The XenForo Media Gallery 2.1 code is (
This has been changed to the following to ensure compatibility with XenForo 2.2 in XenForo Media Gallery 2.2:
The changes required are very small, but given that the Zend classes may no longer exist (or no longer called by the autoloader) then without changes functionality within your add-on may break when a user upgrades to XenForo 2.2.
If you have any questions please post them below.
However, the leadership structure of Zend Framework has undergone some changes in recent years and it has now gone through its most significant change, yet:
From Zend to Laminas - Blog - Zend Framework
Zend Framework project official website
framework.zend.com
Endings and Beginnings: Goodbye, and Please Welcome the Laminas Project! - Blog - Zend Framework
Zend Framework project official website
framework.zend.com
Put simply, Zend Framework has now become Laminas Project - an open source and community-supported project which aims to continue the work started in Zend Framework.
Because we still intend to use the aforementioned components going forward, as they are generally robust and well supported, we have decided that in XenForo 2.2 we will migrate the Zend Framework components we use to use the Laminas Project equivalents.
While this is actually a relatively straight forward change, this does potentially impact add-ons. There are two distinct ways this may affect your add-on code:
- You have included additional Zend Framework components (that we do not include in XF) which you call from within your code.
- You have used Zend Framework components that we do include in XF which you call from within your code.
If you have code which falls into the situation mentioned in
1.
we encourage you to migrate that yourselves - sooner rather than later - to the equivalent Laminas Project component.If you have a significant reliance on Zend/Laminas code in your add-on, you may wish to follow their migration guide which does some of the heavy lifting for you automatically:
If you have code which falls into the situation mentioned in
2.
then we are urging you to prepare a 2.2 specific version of your add-on ready for release as quickly as possible after the release of XenForo 2.2 - ideally while XenForo 2.2 is still in beta.As a specific example of the type of change required in XenForo 2.2, please look at this example from XenForo Media Gallery related to rendering RSS feeds.
The XenForo Media Gallery 2.1 code is (
XFMG\Pub\View\Rss\Index::renderRss()
):
PHP:
$feed = new \Zend\Feed\Writer\Feed();
This has been changed to the following to ensure compatibility with XenForo 2.2 in XenForo Media Gallery 2.2:
PHP:
$feed = new \Laminas\Feed\Writer\Feed();
The changes required are very small, but given that the Zend classes may no longer exist (or no longer called by the autoloader) then without changes functionality within your add-on may break when a user upgrades to XenForo 2.2.
If you have any questions please post them below.