Skip to content

How to add a new package and update .lock file #2046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2012
Merged

How to add a new package and update .lock file #2046

merged 2 commits into from
Dec 19, 2012

Conversation

gajdaw
Copy link
Contributor

@gajdaw gajdaw commented Dec 18, 2012

Command:

composer update

very often causes problems. I think we should add a hint to update only a new package.


.. code-block:: bash

$ php cofmposer.phar update doctrine/doctrine-fixtures-bundle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here: cofmposer should be composer.

And I like using the require command for this:

$ php composer.phar require doctrine/doctrine-fixtures-bundle:@dev

This will update this dependency and add it to the list of requirements in the composer.json file (as well in the composer.lock file)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And actually, it does exactly the 2 steps defined here (plus some validation on what you write in the requirement)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many bundles and packages suggest modification of composer.json and:

composer update

My intention was to give a hint, that one should avoid updating everything.

The method:

php composer.phar require doctrine/doctrine-fixtures-bundle:@dev

is simpler.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gajdaw I think it is better to say 'Hey, they say you need to do it that way, but that can cause problems, this is much easier'.

weaverryan added a commit that referenced this pull request Dec 19, 2012
How to add a new package and update .lock file
@weaverryan weaverryan merged commit 54f8557 into symfony:2.1 Dec 19, 2012
weaverryan added a commit that referenced this pull request Dec 19, 2012
@weaverryan
Copy link
Member

Hey Włodzimierz!

This is a great addition to this note, and a common-enough need that I like mentioning it (even if it is a Composer things).

Thanks!

@gajdaw gajdaw deleted the update-2.1 branch December 19, 2012 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants