It is not possible to create new version of the api using the admin panel.
I've created new API (PSR-0 by default) and then I'm trying to create new version. I'm getting error:
Warning: Missing argument 1 for ZF\Apigility\Admin\Model\VersioningModel::getModuleVersions(),
called in /.../zf-apigility-skeleton/vendor/zfcampus/zf-apigility-admin/src/Controller/VersioningController.php on line 81
and defined in /.../zf-apigility-skeleton/vendor/zfcampus/zf-apigility-admin/src/Model/VersioningModel.php on line 103
It could be fixed by changes:
Controller/VersioningControllerFactory.php:
13: - use ZF\Apigility\Admin\Model\VersioningModelFactory;
13: + use ZF\Apigility\Admin\Model\ModuleVersioningModelFactory;
...
25: - return new VersioningController($container->get(VersioningModelFactory::class));
25: + return new VersioningController($container->get(ModuleVersioningModelFactory::class));
But then we hit another issue:
Could not find source directory at path "/.../zf-apigility-skeleton/module/MyApi/src/MyApi/MyApi".
Make sure the directory exists and is writable.
And it could be resolved by removing:
Model/ModuleVersioningModel.php:
With these changes everything seems to be fine with PSR-0 modules.
Then I've tried with PSR-4 module, and with these changes I get error:
Could not find source directory at path "/.../zf-apigility-skeleton/module/MyApi/src/MyApi".
Make sure the directory exists and is writable.
So the same as above, although lines 447-449 are removed in Model/ModuleVersioningModel.php and variable $srcPath (line 445-446) already has wrong value: /.../zf-apigility-skeleton/module/MyApi/src/MyApi
I've finished on this, don't have more time to investigate more right now. Hope it helps resolve the issue.
It is not possible to create new version of the api using the admin panel. I've created new API (PSR-0 by default) and then I'm trying to create new version. I'm getting error:
It could be fixed by changes:
Controller/VersioningControllerFactory.php
:But then we hit another issue:
And it could be resolved by removing:
Model/ModuleVersioningModel.php
:With these changes everything seems to be fine with PSR-0 modules.
Then I've tried with PSR-4 module, and with these changes I get error:
So the same as above, although lines 447-449 are removed in
Model/ModuleVersioningModel.php
and variable$srcPath
(line 445-446) already has wrong value:/.../zf-apigility-skeleton/module/MyApi/src/MyApi
I've finished on this, don't have more time to investigate more right now. Hope it helps resolve the issue.