定制 sitepark/composer-project 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sitepark/composer-project

Composer 安装命令:

composer require sitepark/composer-project

包简介

Tools to manage composer projects

README 文档

README

codecov

composer-project is a composer plugin for managing a project workflow based on this Branching model

Features:

  • Determine the version of the active Git branch.
  • Determination of the next version of the active Git branch.
  • Checks if all dependencies are stable and the active git branch can be released.
  • Create a hotfix branch from a released version.
  • Create a release

composer-project supports the following branches

  • main
  • support/[MAJOR].x
  • hotfix/[MAJOR].[MINOR].x

Install

The plugin is intended to be used in a CI/CD environment and is installed there globally.

$ composer global require "sitepark/composer-project" --dev

Usage

After composer-project is installed, the following commands are available in the global composer:

  • composer project:version - Outputs the current version of the Git branch
  • composer project:releaseVersion - Outputs the next release version of the current Git branch. Here to the version of the last release of the Git branch is determined and for the branches main and support/[MAJOR].x the minor version is incremented by one. For branches of the form hotfix/[MAJOR].[MINOR].x the patch level is incremented by one.
  • composer project:verifyRelease - It is checked whether the current branch is releasable. For this it is added whether all dependencies were defined with a stable version.
  • composer project:startHotfix - Creates a hotfix branch of the form hotfix/[MAJOR].[MINOR].x based on the current checked out level, where this should be a tag level. the Current tag level should always be the latest patch level of a given minor version. This version is determined and based on this version the Hotifx branch is named.
  • composer project:release - Here the next release version of the current branch is determined and a tag of the form [MAJOR].[MINOR].[PATCH] is created. Releases can be created for the branches main, support/[MAJOR].x and hotfix/[MAJOR].[MINOR].x.

project:verifyRelease

You can use project:verifyRelease to check whether the current branch is releasable. This checks whether all dependencies have been defined with a stable version.

The stability of the versions is checked via Composer\Semver\VersionParser:parseStability. Possible values are: dev, alpha, beta RC or stable. The branch can only be released if all dependencies have been defined with the stability stable.

Use

composer show

To display all dependencies and their versions.

Configuration

allowed-stabilities

default-value: ["stable"]

In exceptional cases, it may be necessary to create a release even though dependencies have been defined with non-stable versions. For example, the following configuration can be set for the project in the composer.json file:

{
  "extra" : {
    "verify-release" : {
      "allowed-stabilities" : ["beta"]
    }
  }
}

In this case, beta versions are also permitted. Several stability levels can be defined.

ignored

default-value: ["roave/security-advisories"]

It's also possible to declare dependencies which should be generally ignored when verifying dependencies:

{
  "extra" : {
    "verify-release" : {
      "ignored" : ["roave/security-advisories", "phpcompatibility/php-compatibility"]
    }
  }
}

sitepark/composer-project 适用场景与选型建议

sitepark/composer-project 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.07k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「plugin」 「comoser」 「project-workflow」 「release-process」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sitepark/composer-project 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sitepark/composer-project 我们能提供哪些服务?
定制开发 / 二次开发

基于 sitepark/composer-project 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-08