Allow building testing php
Description
Currently, the PHP template allows for building and testing PHP projects, but it lacks a standardized job to publish Composer packages to the GitLab Package Registry. Users who want to distribute their PHP libraries via GitLab's registry have to manually implement this step in their .gitlab-ci.yml.
The goal is to add native support for publishing Composer packages to the GitLab Package Registry directly from the template.
Implementation ideas
Add a new job php-publish to the template that automates the publication of the package.
This job should:
- Be part of the
publishstage. - Be disabled by default (opt-in).
- Be configurable via variables:
-
PHP_PUBLISH_ENABLED: To enable the feature. -
PHP_PUBLISH_URL: To override the registry URL if needed (defaulting to the project's GitLab Composer registry).
-
- Use the
CI_JOB_TOKENfor authentication. - Use
curlto trigger the package update/publish endpoint.
The implementation should also include updates to:
-
kicker.jsonfor the configuration tool. -
README.mdto document the new feature and variables.