Skip to content

fix: drop the hardcoded version field so tagged releases resolve correctly - #22

Merged
teofanis merged 1 commit into
teofanis:mainfrom
alright:fix/composer-version-field
Aug 26, 2026
Merged

fix: drop the hardcoded version field so tagged releases resolve correctly#22
teofanis merged 1 commit into
teofanis:mainfrom
alright:fix/composer-version-field

Conversation

@alright

@alright alright commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Removes the hardcoded version field from composer.json, which was stale at 0.1.6 on the v0.1.7 tag and made that release resolve — and install — as 0.1.6.

Composer trusts an explicit `version` field over the git tag it reads the
package from. The v0.1.7 tag was cut manually on bb01a12 rather than through
`composer release:patch`, so its composer.json still carried "0.1.6" — and
Composer therefore resolved the tag as 0.1.6, leaving 0.1.7 uninstallable:

    $ composer show teofanis/hook-press --all   # via VCS, bypassing Packagist
    versions : * 0.1.6, 0.1.5, ..., 0.1.0, dev-main

Removing the field lets Composer and Packagist derive the version from the
tag name, which is the documented recommendation and cannot drift.

`packageBump` is disabled in .changelog so `composer release:*` no longer
writes the field back on the next release; the changelog tool already reads
the current version from git tags, not from composer.json.
@teofanis
teofanis merged commit f30ba73 into teofanis:main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants