Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to bumb version in composer.lock and composer.json #495

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

pvgnd
Copy link
Contributor

@pvgnd pvgnd commented Dec 5, 2019

closes #394

Composer docs states that version in composer.json is

Optional if the package repository can infer the version from somewhere, such as the VCS tag name in the VCS repository. In that case it is also recommended to omit it.

@coveralls
Copy link

coveralls commented Dec 5, 2019

Coverage Status

Coverage remained the same at 99.429% when pulling 5428c51 on pvgnd:patch-1 into 8f36f9e on conventional-changelog:master.

@jbottigliero
Copy link
Member

Hi @pvgnd, thanks for your contribution – this will need to be updated based on the changes to bump and package files that just landed in master, but this looks good to me and should be ok to release with the next major.

@pvgnd
Copy link
Contributor Author

pvgnd commented Dec 6, 2019

Actually, doesn't seem to be the right fix. The hash of the composer.lock depends on the composer.json content, so after bumping the version in composer.json, the composer.lock is not up to date with the new hash. So we need to run a postbump hook : composer update --lock

@jbottigliero
Copy link
Member

@pvgnd maybe it makes sense to remove composer files from the default configuration altogether and provide an example for a composer-based library instead? Looking back on #394 and now that folks are better able to write their own updaters and bump files it might be the best route...

@tommywo
Copy link
Member

tommywo commented Dec 8, 2019

@jbottigliero I agree. Also composer docs states that version in composer.json is

Optional if the package repository can infer the version from somewhere, such as the VCS tag name in the VCS repository. In that case it is also recommended to omit it.

So we should also include that in the docs.

@pvgnd pvgnd force-pushed the patch-1 branch 2 times, most recently from e41081f to 165c86e Compare December 11, 2019 15:51
@pvgnd
Copy link
Contributor Author

pvgnd commented Dec 20, 2019

I just rebased on master

@pvgnd
Copy link
Contributor Author

pvgnd commented Jan 6, 2020

@jbottigliero I just rebased the PR

@pvgnd pvgnd changed the title No need to bumb version in composer.lock No need to bumb version in composer.lock and composer.json Jan 6, 2020
@jbottigliero jbottigliero merged commit c934f3a into conventional-changelog:master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Versions in composer
5 participants