In https://github.com/laminas-api-tools/api-tools-rest/pull/28, the parent method AbstractResourceListener#fetchAll() has been updated to support Laminas\Stdlib\Parameters as possible parameter type. Before this fix, the only type was array, and this led to errors on some array functions like e.g. array_key_exists(...).
In consequence, the template in this repository should be updated from:
use Laminas\ApiTools\ApiProblem\ApiProblem;
use Laminas\ApiTools\Rest\AbstractResourceListener;
class <?= $classname ?> extends AbstractResourceListener
{
...
/**
* Fetch all or a subset of resources
*
* @param array $params
* @return ApiProblem|mixed
*/
public function fetchAll($params = [])
to:
use Laminas\ApiTools\ApiProblem\ApiProblem;
use Laminas\ApiTools\Rest\AbstractResourceListener;
use Laminas\Stdlib\Parameters;
class <?= $classname ?> extends AbstractResourceListener
{
...
/**
* Fetch all or a subset of resources
*
* @param array|Parameters $params
* @return ApiProblem|mixed
*/
public function fetchAll($params = [])
Bug Report
Summary
In https://github.com/laminas-api-tools/api-tools-rest/pull/28, the parent method
AbstractResourceListener#fetchAll()
has been updated to supportLaminas\Stdlib\Parameters
as possible parameter type. Before this fix, the only type wasarray
, and this led to errors on some array functions like e.g.array_key_exists(...)
.In consequence, the template in this repository should be updated from:
to:
Here's the PR fixing it : https://github.com/laminas-api-tools/api-tools-admin/pull/83
Thanks and greetings, Pascal