Search code examples
zend-framework2composer-phpzend-studio

Internal error when trying to use any composer functionality


I'm using composer in a ZF2 PHP project in Zend Studio 10.6. I recently tried to add a depency to the project, and I received an "internal error". Since then, whenever I try to use any function, I receive the same error:

Error msg

"An internal error occurred during: "Package Details". For input string: "if (defined('COMPOSER_DEV_WARNING_TIME') && $commandName !== 'self-update' && $commandName !== 'selfupdate' && time() > COMPOSER_DEV_WARNING_TIME""

The search function when I try to add a depency also does no longer find any packages, even though I have a repository installed.

I'm very grateful for any suggestions!


Solution

  • I had the same problem. My solution was to use the composer via the commander. Make sure you have installed the composer (check by writing "composer -V" in your commander to see your version), then just place your dependency in your composer.json file. For example:

    "require" : {
    "php" : ">=5.3.3",
    "zendframework/zendframework" : "=2.3.7",
    

    Run the command: "composer update" in your project. For me this worked. You can use all composer functions in the commander. You can find help here if you use Ubuntu: How to install and Use Composer on Ubuntu