feat(package): Support PHP composer dev-* branch - #38563
Open
douyun-dtyq wants to merge 6 commits into
Open
Conversation
douyun-dtyq
force-pushed
the
dev-branch/v2
branch
from
July 25, 2026 10:04
48be57b to
1bfb259
Compare
User can POST to
/packages/{owner}/composer/{vendor}/{project}/-/composer/dev-branch to
create a dev-<branchname> version as a virtual version to link to
branch (or other refs) archive zips. The behavior should match
packagist.
Also set composer SemverCompatible to false to support this.
... not 500
douyun-dtyq
force-pushed
the
dev-branch/v2
branch
from
July 27, 2026 02:19
1bfb259 to
5218b87
Compare
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.
Users can POST to
/packages/{owner}/composer/{vendor}/{project}/-/composer/dev-branchto create adev-<branchname>version as a virtual version to link to branch (or other refs) archive zips. The behavior matches Packagist.Also set composer
SemverCompatibleto false to support this.Needs a migration like
UPDATE package SET semver_compatible = false WHERE "type" = 'composer';for theSemverCompatiblechange. But I'm not sure how to create a migration commit for this project, so it's currently missing. Guidance on this would be appreciated!Code was written by GitHub Copilot with GPT5.5, but all changes have been thoroughly reviewed and tested by myself (both newly added unit tests and on a real instance). I take full responsibility for the code.
Discussions:
SemverCompatibleseems not very useful for thepackagemodel and is often just a cumbersome burden. In my opinion, trying to parse the version string and silently failing is better than staticSemverCompatiblecontrol for packages.dev-*versions: should we allow out-of-scope repositories (like the package is atsomeorg, but thedev-masterlinks to the master branch ofanotherorg/somerepo) or even external links?/packages, not/v1/packages) and WebUI (since current composer package workflow is API only). Maybe we can add a simple switch on the WebUI for this feature?BTW: should we alias/link/mount
/packagesroutes to/v1/packagesto show it in swagger?