2

I have below content in my composer.json:

{ "require": { "symfony/class-loader": "2.3.*", "symfony/event-dispatcher": "2.3.*", "liip/drupal-testing": "dev-master", } } 

This project has been in production for a while and I want to add a new package (dejanb/stomp-php) without updating any of the existing packages. Executing below command adds the new packages and made necessary changes to autoloader, composer.json and composer.lock files.

composer require --prefer-dist "fusesource/stomp-php:2.1.*" 

All good so far. Now found the the new packages I added doesn't provide all my requirements and I would need to apply my patch on top of it. So I forked it and committed changes.

Now I can do https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository to update my fork in composer.json and run composer update. However It updates all the the packages in composer.json.

Is there a way/command to add my new fork without update existing packages?

4
  • Why are you using "2.3.*" instead of "2.3.1" for example? Commented Aug 7, 2014 at 13:50
  • It's been there. I can't add/change it now. Commented Aug 7, 2014 at 13:51
  • 1
    Look here: getcomposer.org/doc/03-cli.md#update Commented Aug 7, 2014 at 13:51
  • I believe that if you run php composer.phar update vendor/package vendor/package2 It will only update the vendor you need. Commented Aug 7, 2014 at 13:52

1 Answer 1

2

If you run the command

php composer.phar update vendor/package vendor/package2 

It will only update those packages. Therefore, if you run:

php composer.phar update dejanb/stomp-php 

You should be good.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.