Reputation: 1054
For each new project, I want to:
I know I could manually specify latest versions from packagist.org, but Ideally I'd like this automated.
I hope this makes sense.
Thanks
Upvotes: 4
Views: 13401
Reputation: 70933
Running composer require vendor/package
will consult packagist.org for the most current released version and add both the latest release and the version requirement to get this release and compatible updates later.
This will install only stable versions.
After the initial install, you have two options:
composer install
will again install the previously found packages.composer update
will look for updated packages that match the version requirement.Never run update
unattended. A developer should run this consciously and then run the test suite to determine if everything still works (or the continuous integration job does it if available). Especially only run install
when deploying to production.
Upvotes: 3
Reputation: 174
"require": {
"namespace/libname": "@dev"
}
Upvotes: 6