davidrjonas / composer-lock-diff

See what has changed after a composer update
MIT License
276 stars 18 forks source link

Would like to see core diff() implementation as general utility (plus more things…) :) #4

Closed prometheas closed 7 years ago

prometheas commented 7 years ago

I'd really like to see the diff() function in your main script evolve into something that can use various sources for each composer.lock file (e.g., URL + URL, revision hash + URL, file path + URL, etc), as well as support multiple formatters.

# two git tags
$ composer-lock-diff --from 1.0.3 --to 1.1.0
# branch heads
$ composer-lock-diff --from dev-master --to dev-feature/foo
# mixed (assume restrictive networking rules apply to this URL ;-))
$ composer-lock-diff --from http://somehost.com/composer.lock --to dev-master

I acknowledge that will introduce great complexity (e.g., more files, likely dependencies), but I'm prepared to do that work.

My question for you, however, is whether you'd like me to attempt the work as a pull request, or whether you'd prefer I create a new project (with a different name, naturally) and give attribution to your utility as a foundational source.

davidrjonas commented 7 years ago

Hey, thanks for taking an interest!

This is a great idea and I took a stab it. I think it should meet your requirements and avoids new dependencies. Please look it over and I'll merge it up. PR https://github.com/davidrjonas/composer-lock-diff/pull/6

prometheas commented 7 years ago

Went on holiday just after getting this conversation started, and only now catching up on Github things. PR #6 does The Thing—nice.