zfcampus / zf-apigility-admin

Admin API and UI for Apigility
BSD 3-Clause "New" or "Revised" License
90 stars 64 forks source link

Updated my project to latest apigility, getting issues. #296

Open haridorna opened 9 years ago

haridorna commented 9 years ago

Hi I Have updated my project to latest apigility.

Working well on my windows localhost. But on linux server getting the below Fatal error and completely blocked, please help.

PHP Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for ZF\Apigility\Admin\Listener\CryptFilterListener' in /home/ubuntu/api.privpass.com/Privypassapidev/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:555\nStack trace:\n#0 /home/ubuntu/api.privpass.com/Privypassapidev/vendor/zfcampus/zf-apigility-admin/Module.php(69): Zend\ServiceManager\ServiceManager->get('ZF\Apigility\Ad...')\n#1 [internal function]: ZF\Apigility\Admin\Module->onBootstrap(Object(Zend\Mvc\MvcEvent))\n#2 /home/ubuntu/api.privpass.com/Privypassapidev/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))\n#3 /home/ubuntu/api.privpass.com/Privypassapidev/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('bootstrap', Object(Zend\Mvc\MvcEvent), Array)\n#4 /home/ubuntu/api.privpass.com/Privypass in /home/ubuntu/api.privpass.com/Privypassapidev/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 555

lmkodali commented 9 years ago

Even I an getting the same error. We updated Apiligity and the developer mode is not working. Can someone please help us out.

weierophinney commented 9 years ago

Unfortunately, I am unable to recreate the issue. A brand new install of Apigility on a linux environment "just works" for me. This sounds like you're missing dependencies; can you do a composer update in the project on the linux host? and/or:

$ rm -Rf composer.lock vendor
$ composer install

to see if this brings in the dependencies correctly?

haridorna commented 9 years ago

I am still gettting this problem. Works fine when I checkout a fresh repository. But when I add other composer libraries and run "composer update", everything breaks with the following error.

Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for ZF\Apigility\Admin\Listener\CryptFilterListener' in E:\projects\Privypassapidev\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 555

Zend\ServiceManager\Exception\ServiceNotFoundException: Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for ZF\Apigility\Admin\Listener\CryptFilterListener in E:\projects\Privypassapidev\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 555

My composer.json is as below with all new versions configured.

{ "name": "zfcampus/zf-apigility-skeleton", "description": "Skeleton Application for Apigility", "type": "library", "license": "BSD-3-Clause", "keywords": [ "api", "apigility", "framework", "zf2" ], "homepage": "http://apigility.org/", "support": { "email": "apigility-users@zend.com", "irc": "irc://irc.freenode.net/apigility", "source": "https://github.com/zfcampus/zf-apigility-skeleton", "issues": "https://github.com/zfcampus/zf-apigility-skeleton/issues" }, "config": { "process-timeout": 5000 }, "extra": { "branch-alias": { "dev-master": "1.3-dev", "dev-develop": "1.4-dev" } }, "require": { "php": ">=5.5", "zendframework/zendframework": "~2.4", "zfcampus/zf-apigility": "~1.1", "zfcampus/zf-apigility-documentation": "^1.0.5", "zfcampus/zf-development-mode": "~2.0", "facebook/php-sdk-v4" : "4.0.", "guzzlehttp/guzzle": "~4", "aws/aws-sdk-php": "2.", "aws/aws-sdk-php-zf2": "1.2.", "mandrill/mandrill": "1.0.", "stripe/stripe-php": "2.", "ricardoper/twitteroauth": "1." }, "require-dev": { "zendframework/zftool": "dev-master", "zendframework/zend-developer-tools": "dev-master", "zfcampus/zf-apigility-admin": "^1.3.1", "zfcampus/zf-deploy": "~1.0" }, "suggest": { "zfcampus/zf-apigility-doctrine": "zfcampus/zf-apigility-doctrine ~1.0 to create Doctrine-Connected REST services", "zfcampus/zf-http-cache": "zfcampus/zf-http-cache ~1.0 to add HTTP caching to your API", "zfr/zfr-cors": "zfr/zfr-cors ~1.2 to add CORS support to your API" } }

Please help what can I do here.

Thanks.

nepda commented 7 years ago

I know, this issue is very old. But I've had the same issue. Solved it by putting the modules needed by Apigility at the end of my loaded module-array.

michalbundyra commented 4 years ago

This repository has been closed and moved to laminas-api-tools/api-tools-admin; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-admin/issues/31.