PHP Composer: Publish Package
Problem to solve
PHP Developers need a way to publish
their PHP packages so that they can use them in their project and share them with their teammates
Proposal
Implement the endpoint below to support publishing PHP Composer Packages.
Endpoint should take a tag
or branch
name param and publish said tag/branch as a Composer package.
This requires creating the package
object for the specified version with the relevant metadata.
Assumptions
Before publishing a package, it's assumed the package is already hosted on gitlab on a branch or tag following PHP version convensions.
Questions
- What happens when publishing a branch? The branch can move and, therefore, the metadata might need update. Should we freeze the package and require publishing again to update the branch or should the package automatically follow pushes to the branch?
Endpoint
POST /api/v4/projects/:id/packages/composer
Param | Value |
---|---|
branch |
The branch name to publish |
tag |
The tag name to publish |
Edited by Tim Rizzi