Open
Conversation
Allows automatically writing the detected git tag into composer.json (plugins) or manifest.xml (apps) during zip creation, without requiring an explicit --overwrite-version value. The flag is mutually exclusive with --disable-git (no tag available) and --overwrite-version (conflicting version sources). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ag-as-version Git tags often use the 'v' prefix convention (e.g. v1.1.0), but composer.json and manifest.xml expect a plain semver string (1.1.0). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Many Shopware plugins are developed without a
versionfield incomposer.json— the version is managed exclusively through git tags. When runningextension zip, the detected git tag is already used to name the resulting zip file (e.g.MyPlugin-1.1.0.zip), but it is never written intocomposer.jsonormanifest.xml. This means the packaged extension carries no version metadata internally, which can cause issues with version validation and upload workflows.Solution
A new flag
--use-git-tag-as-versionis introduced for theextension zipcommand. When set, the git tag detected during packaging is automatically written as the version into:composer.jsonfor Platform Plugins and Shopware Bundlesmanifest.xmlfor Shopware AppsThe existing
BuildModifierinfrastructure already handles this write — the flag simply wires the detectedtaginto it.Git tags using the common
v-prefix convention (e.g.v1.1.0) are handled correctly: the prefix is stripped before writing,resulting in a plain semver string (
1.1.0) in the metadata file.Constraints
The flag is mutually exclusive with:
--disable-git— without git, no tag can be detected, so the flag has no meaningful value--overwrite-version— both flags set the version; combining them would be ambiguousUnchanged behavior
The existing
--overwrite-versionflag continues to work as before and takes precedence if used directly.