laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

An abstract factory could not create an instance #46

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

So I tried this tutorial to get a simple project running to see if I can use Apigility. So far no good.

Is it too old?

I get the error on GET /providers:

"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "An abstract factory could not create an instance of economycomparev1restproviderscontroller(alias: EconomyCompare\V1\Rest\Providers\Controller)."

I just want a simple CRUD example or I guess I will go back to Slim PHP and build my own stuff that I can get running...


Originally posted by @Zyles at https://github.com/zfcampus/zf-apigility/issues/131

michalbundyra commented 4 years ago

With this information it will be hard to help you. Did you define a controller config for a controller named EconomyCompare\V1\Rest\Providers\Controller? Seems to me your controller config is simply missing.

I would suggest posting a question here or better on StackOverflow with more details and then I can maybe help you.


Originally posted by @Wilt at https://github.com/zfcampus/zf-apigility/issues/131#issuecomment-132183324

michalbundyra commented 4 years ago

Verify if you wrote the correct path at ProvidersResourceFactory Class. $mapper = $services->get('EconomyCompare\V1\Rest\MyModule\ProvidersMapper');


Originally posted by @evandroabdao at https://github.com/zfcampus/zf-apigility/issues/131#issuecomment-169204480