2012-11-13 10:25

composer.phar更新然后解析错误:语法错误,意外$ end


I'm using Zend Framework 2.

After an update (I guess quite long because I had to use "COMPOSER_PROCESS_TIMEOUT=5000 php composer.phar update"). I get this strange error "Parse error: syntax error, unexpected $end"... so I add to the end of the current file an "?>" but another file error has coming with this similar error.. If you see every files of Zend Framework 2 (or ex: 1.11), no one has this end.

So my question is : It's a mistake of the composer.phar when updating or a mistake with my PHP (php.ini) ?

To explain with a concrete example, I'm trying to install "socalnick/scn-social-auth". So I changed the composer.json file according the installation ( then these errors.

Somebody has this kind of error ?

Thanks a lot Have a good day !

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • dtcmadj31951 dtcmadj31951 8年前

    I found the solution.. shame on me ! Just after an update of Debian

    # apt-get update 
    # apt-get upgrade 

    The website is back !

    Last update

    It seems the problem is coming from the virtual machine (I'm using VMware) so just reboot your virtual machine and all will be perfect !

    点赞 评论 复制链接分享
  • doumeng3080 doumeng3080 8年前

    At first, updating Debian as Remi Thomas suggested worked. But when using Composer to install the project again, the same problem occured.

    In my case it looks like the culprit is my setup, which is a virtual machine (VMWare Fusion) and shared folders between guest and host. Luckily, all I have to do is to restart the virtual machine and what do you know, the problem goes away.

    For anyone else having the same problem, maybe this can save you a couple of hours worth of debugging.

    点赞 评论 复制链接分享
  • doupo1865 doupo1865 9年前

    Can you try to change in composer.json

    "zendframework/zendframework": "dev-master",


    "zendframework/zendframework": "2.*",

    I've seen some strange behaviour with "dev-master" settings.

    点赞 评论 复制链接分享