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?
To update to the latest versions, use the update command. This will fetch the latest matching versions (according to your composer.json file) and update the lock file with the new versions.
update / u# In order to get the latest versions of the dependencies and to update the composer. lock file, you should use the update command. This command is also aliased as upgrade as it does the same as upgrade does if you are thinking of apt-get or similar package managers.
To install doctrine/doctrine-fixtures-bundle
with version 2.1.*
and minimum stability @dev
use this:
composer require doctrine/doctrine-fixtures-bundle:2.1.*@dev
then to update only this single package:
composer update doctrine/doctrine-fixtures-bundle
If you just want to update a few packages and not all, you can list them as such:
php composer.phar update vendor/package:2.* vendor/package2:dev-master
You can also use wildcards to update a bunch of packages at once:
php composer.phar update vendor/*
source
when available.dist
when available.php
, hhvm
, lib-*
and ext-*
requirements and force the installation even if the local machine does not fulfill these. See also the platform
config option.require-dev
(this is the default behavior).require-dev
. The autoloader generation skips the autoload-dev
rules.--prefer-stable
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With