Sorting issue in class AbstractPluginManagerModel
weierophinney opened this issue · 1 comments
I have never noticed it before but today a PHP ERROR appears in the log for the class ZF\Apigility\Admin\Model\AbstractPluginManagerModel.
It seems to be due to a the function sort that is called on the property plugins which is not initialized as an array.
I do not exactly know why it occurs now but when the variable plugins is an empty array, the property plugins is set to null and throw this error on line 62.
Originally posted by @dlevel at zfcampus/zf-apigility-admin#339
Problem is that, at least, zend-hydrator changed removing the "invokableClasses" property replacing it by "factories" property to declare the hydrators it is able to create.
Apigility relies only on "invokableClasses" which is empty / null, thus the later sort() on $this->plugins in AbstractPluginManagerModel fails.
I fixed that issue by overloading several classes of Apigility just to be able to override the getPlugins() method ^^
Will see if I can submit a patch to the devs.
Originally posted by @IntelliShop-G-Schuster at zfcampus/zf-apigility-admin#339 (comment)