Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer.json getting latest package version and

Tags:

composer-php

For each new project, I want to:

  • Get the latest versions of all packages inside composer.json
  • Once I have them I no longer want to get the latest - just the version of the first run.

I know I could manually specify latest versions from packagist.org, but Ideally I'd like this automated.

I hope this makes sense.

Thanks

like image 411
Pete Norris Avatar asked Oct 27 '25 10:10

Pete Norris


1 Answers

  1. the latest package:

"require": { "namespace/libname": "@dev" }

  1. after install of this package, composer will dump all info (and version) to composer.lock. do not remove this file and do not use composer update. always use composer install because this will force composer to look into composer.lock file for package version
like image 158
kamil_oos Avatar answered Oct 30 '25 13:10

kamil_oos