4

I have been trying to install Buzz for Symfony2. I added it to the deps file, and tried to update my vendors :

php bin/vendors update

The command simply tells me that I've installed the standard version, and that I should try to use :

php bin/vendors install --reinstall

instead. Which I did.

But then an error pops in and tells me :

Updating deps.lock
sh:/var/www/Symfony/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php: not found
PHP Fatal error:  Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /var/www/Symfony/app/autoload.php on line 37
PHP Fatal error:  Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /var/www/Symfony/app/autoload.php on line 37

And then nothing works anymore, which is not surprising because my vendors folder is almost empty.

Has anyone encountered this problem before? Any clue on how to fix it?

Edit :

I found out the origin of this error. I didn't have git installed, so I did :

sudo apt-get install git-core

Check this link for more info on that : http://comments.gmane.org/gmane.comp.php.symfony.symfony2/8239

However I'm having another error now ("Looked for namespace "buzz.client.curl", found none"). I'm making another thread for that one, as it is not the same problem (link here).

Community
  • 1
  • 1
Gabriel Theron
  • 1,346
  • 3
  • 20
  • 49
  • What happens when you delete *deps.lock* and then `php bin/vendors install -reinstall`? – Samy Dindane May 16 '12 at 15:44
  • 1
    My deps file (with Buzz in it) is: http://pastebin.com/AHzFzXqc but warning: it contains a new version of Doctrine (not included in current symfony release). – gremo May 16 '12 at 15:50
  • I get the same error, even with your deps file. – Gabriel Theron May 16 '12 at 15:50
  • Add new line at the end of the file – a.tereschenkov May 16 '12 at 15:53
  • I did hehehe. It simply tells me again that AnnotationRegistry not found... – Gabriel Theron May 16 '12 at 15:54
  • @GabrielTheron download a new copy just for testing, without vendors. Then grab my deps file and substitute the original, remove deps.lock and try again. Also check http://groups.google.com/group/symfony2/browse_thread/thread/89a9240384dc1e34 – gremo May 16 '12 at 15:59
  • @Gremo post your deps.lock too. If he has SensioDistributionBundle locked on an old version that doesn't have build_bootstrap, changing deps won't help much. – meze May 17 '12 at 09:17
  • 1
    @meze didn't know the buil_bootstrap thing, here is the lock http://pastebin.com/RAqsxwq9 – gremo May 17 '12 at 10:09
  • I finally found the problem. It turns out that I didn't have git installed, which is why the installation always failed -.- I found out thanks to this link (I'll edit my first post as well) http://comments.gmane.org/gmane.comp.php.symfony.symfony2/8239 – Gabriel Theron May 18 '12 at 07:48
  • @GabrielTheron how could you not notice such an error? ;s – meze May 22 '12 at 10:25
  • Must be that I'm tired ^^. Well, beyond that, the error was far from being explicit, and I'm not a very experimented linux console user :p – Gabriel Theron May 22 '12 at 14:01

3 Answers3

3

That's not the right way to update your vendors. Per the docs

There is also a php bin/vendors update command, but this has nothing to do with upgrading your project and you will normally not need to use it. This command is used to freeze the versions of all of your vendor libraries by updating them to the version specified in deps and recording it into the deps.lock file.

Ergo, all you need to do is run php bin/vendors install (I know, it's confusing. I partially blame them for poorly naming the sub-command)

EDIT

To help resolve your current issues, try these steps

  1. rm -rf vendor/*
  2. rm -rf app/cache/*
  3. rm app/bootstrap.php.cache
  4. php bin/vendors install

Hope it works

Peter Bailey
  • 105,256
  • 31
  • 182
  • 206
2

Try to remove everything from "vendor" folder and run

php bin/vendors install

command

a.tereschenkov
  • 807
  • 4
  • 10
2

Before you add in deps file copy all the content of deps file in any of your text editor,then delete all your contents of deps and add the Buzz link in deps only. Then try the below command

php bin/vendors install --reinstall

this will install the BUZZ bundle safely. After installing BUzz bundle you can paste all the deps content that you have copied earlier. If you are trying this make sure to download new symfony project and try this. May be this will helps you. I tried it earlier on one of my project.

greg0ire
  • 22,714
  • 16
  • 72
  • 101
Asish AP
  • 4,421
  • 2
  • 28
  • 50