Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
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 therequire command for this:
$ php composer.phar require doctrine/doctrine-fixtures-bundle:@devThis will update this dependency and add it to the list of requirements in thecomposer.json file (as well in thecomposer.lock file)
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 ofcomposer.json and:
composer updateMy intention was to give a hint, that one should avoid updating everything.
The method:
php composer.phar require doctrine/doctrine-fixtures-bundle:@devis simpler.
There was a problem hiding this comment.
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'.
How to add a new package and update .lock file
weaverryan commentedDec 19, 2012
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! |
Command:
very often causes problems. I think we should add a hint to update only a new package.