Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Issues integrating Apigility with latest ZF2 skeleton #341

Open
NathanHaley opened this issue May 13, 2016 · 3 comments
Open

Issues integrating Apigility with latest ZF2 skeleton #341

NathanHaley opened this issue May 13, 2016 · 3 comments

Comments

@NathanHaley
Copy link

NathanHaley commented May 13, 2016

I just want to start a project with the latest zf2, apigility, angular as my starting point. Basically, how can I best accomplish this please? Below for what I have tried and issues.

Installing latest ZF2 skeleton and then follow instructions on Apigility for integrating into existing projects OR installing Apigility skeleton and composer updating gives me a couple issues.

One, with admin 1.2.3 there is an issue with some interface dropdowns turning into input fields and basically not working. Search yeilded information to try setting dependency back to 1.2.2 in composer.lock which seemed to work but trying again it does not. This issue happens even if I install the Apigility skeleton and run composer update.

The biggest issue I have right now is trying to start from a fresh and most up to date ZF2 skeleton and then add latest Apigility. The admin dashboard opens but get warning about "Unable to Fetch Dashboard" and can add service as it says there is an issue and to check if already exists.

I am on Fedora 23 and steps I have tried are:

Scenario 1:
zftool create project ./
composer install //in root
composer require zendframework/zftool:dev-master
composer require zendframework/zendframework
zftool.phar diag -v //everything ok at this point

//From https://apigility.org/documentation/recipes/apigility-in-an-existing-zf2-application
composer require "zfcampus/zf-apigility:~1.0"
composer require --dev "zfcampus/zf-apigility-admin:~1.0"
composer require --dev "zfcampus/zf-development-mode:~2.0"
//Follow rest of instructions for simple configuration

composer update

Scenario 2:
//install, git clone or composer, from https://github.com/zendframework/ZendSkeletonApplication

//From https://apigility.org/documentation/recipes/apigility-in-an-existing-zf2-application
composer require "zfcampus/zf-apigility:~1.0"
composer require --dev "zfcampus/zf-apigility-admin:~1.0"
composer require --dev "zfcampus/zf-development-mode:~2.0"
//Follow rest of instructions for simple configuration

composer update

scenario 3:
//Install Apigility Skeleton, tried from github and download from site
composer update //will have issues with dropdowns and admin 1.2.3

I thought I had been able to get scenario 3 to work by installing admin 1.2.2 but after trying again it doesn't work and anyway I don't really like this setup as it doesn't seem to have the same modules, as many, as zf2 skeleton and I don't want to have to always manage worrying about updating and having to figure out what is different from base zf2 skeleton.

At this point I'm getting a little nervous about this platform situation, zf2/Apigility, as it seems to be extremely fragile and I will ever be solving dependency issues OR am I missing something?

Thanks for any help or suggestions.

Nathan

@NathanHaley
Copy link
Author

I have concluded, or maybe realized, that by applying composer update I was effectively breaking things as I was getting versions of things that are beyond the latest Apigility and ZF2 projects' stable dependencies.

Or put another way, if installed, and not update thru composer, you should have the latest ZF2 skeleton and Apigility.

@IntelliShop-G-Schuster
Copy link

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.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-admin; a new issue has been opened at laminas-api-tools/api-tools-admin#19.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants