How to update a single library with Composer?

I need to install only 1 package for my SF2 distribution (DoctrineFixtures).

When I run

php composer.phar update

I get

  - Updating twig/twig (dev-master 39d94fa => v1.13.0)
    The package has modified files:
    M CHANGELOG
    M doc/filters/batch.test
    M doc/filters/index.rst
    M doc/filters/url_encode.rst
    M doc/functions/index.rst
    M doc/tags/index.rst
    M doc/tests/index.rst
    M lib/Twig/Autoloader.php
    M lib/Twig/Compiler.php
    M lib/Twig/CompilerInterface.php
-10 more files modified, choose "v" to view the full list

It appears the last developer edited a lot of files inside vendor.

In order to get around this, I tried

php composer.phar update <package_name>

But that doesn’t seem to work. How can I update/install only one library from composer.json?

8 Answers
8

Leave a Comment