SanderSander / composer-link

Adds ability to link local packages for development with composer
https://packagist.org/packages/sandersander/composer-link
Other
58 stars 3 forks source link

How does it track changes in composer.lock #26

Closed aftabnaveed closed 2 years ago

aftabnaveed commented 2 years ago

This seems to an interesting utility as opposed to the https://github.com/franzliedke/studio. The problem with the studio is that that it will keep the reference of the local package path in composer.lock file. This utility seems to fix that problem just by keeping the reference in the composer.lock file and linking the package in the background.

My question is when I have completed my changes in the package and now its time to run composer update vendor/package will it update the hash and timestamp in composer.lock file?

SanderSander commented 2 years ago

My question is when I have completed my changes in the package and now its time to run composer update vendor/package will it update the hash and timestamp in composer.lock file?

Yes it will, the goal of this plugin is to maintain normal behavior of composer when updating/installing packages

As example when I have package/package on version 1.0.0 and I link that package to a local directory when I run a full composer update it will just update that package as normal from 1.0.0 to 1.0.1 and update the lock file. After this whole process this plugin will link the directory back in.

aftabnaveed commented 2 years ago

This makes sense thank you.