5

I want to integrate the Doctrine 2 to an Apigility driven Zend Framework 2 application.

So I installed zfcampus/zf-apigility-doctrine

$ composer require zfcampus/zf-apigility-doctrine "~0.3"

and activated the modules Phpro\DoctrineHydrationModule, ZF\Apigility\Doctrine\Server, and ZF\Apigility\Doctrine\Admin in the application config files (/config/application.config.php and /config/development.config.php).

What should be done next to start using Doctrine in the application as general and particularly in the Apigility Admin area?

automatix
  • 14,018
  • 26
  • 105
  • 230

1 Answers1

1

I experimented with this Apigility extension in the fall but it was far from complete at that point. The server code was usable but there wasn't any UI integration to speak of. You can still manipulate endpoints by dissecting how zf-apigility-doctrine's controllers work and the information provided in the README. The rest is mostly trial and error. At the time I used the Postman plugin for Chrome to send requests to the endpoints mentioned in the README, trying different inputs until I found something that worked. It looks like they've made good progress on this portion of the integration since I last tried but I haven't revisited since to try again.

It seems there's no official integration with the Apigility admin UI yet. There is a repository for it (https://github.com/zfcampus/zf-apigility-admin-ui) but a quick browse of the open tickets shows it's not working yet. Someone has forked it and worked on it, but I haven't looked into it myself so I can't comment on it's readiness.

My suggestion is that if you want to learn how to integrate zf-apigility-doctrine into your Apigility the best way to do that right now is to take a look at Roll'n API (source here)

Adam Lundrigan
  • 598
  • 2
  • 11
  • Thank you for your answer! Rolln API: I downloaded Rolln API some days ago from https://github.com/StukiOrg/RollnApi. Unfortunately I could not get it working. First there were some `composer` issues (see https://github.com/StukiOrg/RollnApi/issues/9), then other errors. Well, now I used your link and installed https://github.com/TomHAnderson/RollnApi. Seems to work. Trying it out... – automatix Feb 03 '15 at 12:22
  • I have experimented with RollNApi a little. The application provides some info about how the combination Apigility+Doctrine+OAuth2 can work together. But it would be nice to know, how to build an Apigility+Doctrine on one's own -- and this is the info I can find nowhere on the internet. The ["zfcampus/zf-apigility-doctrine README.md"](https://github.com/zfcampus/zf-apigility-doctrine#apigility-for-doctrine) doesn't really serve this purpose. – automatix Feb 03 '15 at 17:15
  • Agreed. This part of Apigility is still in flux, so I suspect we'll see a big push to complete the documentation in the final days/weeks before the feature is officially released. – Adam Lundrigan Feb 03 '15 at 20:02