artisan-build/kibble 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

artisan-build/kibble

Composer 安装命令:

composer require artisan-build/kibble

包简介

PHP package creation and management tools

README 文档

README

This is the package that makes our package manager work.

Warning

This package is currently under active development, and we have not yet released a major version. Once a 0.* version has been tagged, we strongly recommend locking your application to a specific working version because we might make breaking changes even in patch releases until we've tagged 1.0.

Installation

composer require artisan-build/kibble

Configuration

Usage

Splitting packages

php artisan kibble:split mirrors each packages/* directory to its own read-only repository on GitHub. The monorepo is always the source of truth — split repositories are force-synced from it.

# Split every package (force-syncs each split repo's main branch)
php artisan kibble:split

# Split a single package
php artisan kibble:split adverbs

Distribution cleaning (default)

A split repository exists to be published, so by default kibble:split does not copy each package's composer.json verbatim. It produces a distribution composer.json for the split that strips dev-only wiring which is load-bearing inside the monorepo but wrong in the published package:

  1. The top-level version field is removed so Packagist derives the version from the git tag rather than a hardcoded value (a stale version field breaks tag-derived/lockstep versioning).
  2. repositories entries whose type is path are removed — their ../sibling urls do not exist for consumers and otherwise print The url supplied for the path (../<sibling>) repository does not exist on every composer require. Non-path repositories are preserved, and the repositories key is dropped entirely when nothing remains.

Anything else in composer.json is left untouched. The strip is applied to the split artifact only — the monorepo's own packages/<pkg>/composer.json on disk is never modified. Mechanically, the cleaned content is committed in a detached worktree after git subtree split and before the pushes, so both main and any --tag ref point at the cleaned commit.

Pass --no-clean to opt out and publish each composer.json verbatim (raw passthrough):

# Publish composer.json exactly as it appears in the monorepo
php artisan kibble:split adverbs --no-clean

Lockstep release tagging

Pass --tag to also tag every split repository with a release version, following the Laravel illuminate/* lockstep model — every split repo is tagged with the same version on every release, even packages with no changes:

# Force-sync main AND create the tag on every split repo
php artisan kibble:split --tag=v1.2.0

# Tag a single package
php artisan kibble:split adverbs --tag=v1.2.0

Notes:

  • Idempotent re-runs. The tag is pushed with --force. git subtree split synthesizes new commit SHAs on each run, so a re-run of a failed or partial release simply re-points the tag at the new split commit rather than erroring that the tag already exists. (Re-publishing an already-released version is still discouraged, but the mirror model permits it.)
  • No local tag is created. The tag is pushed via a ref-spec (split-branch:refs/tags/<tag>), so no tag is written into the monorepo checkout. This avoids colliding with the monorepo's own release tag that triggered the split in CI.
  • Partial failures. The command stops on the first failed sub-command, which can leave a release partially tagged. Because tag pushes are force-idempotent, simply re-run the same command to finish the release.
  • CI requirements. git subtree split needs full history, so check out with fetch-depth: 0. Split repositories must already exist. Outside the local environment, pushes authenticate with the GH_USERNAME / GH_TOKEN credentials (see Configuration).

Example release workflow step (run on a monorepo tag push):

- uses: actions/checkout@v4
  with:
    fetch-depth: 0
- run: composer install --no-interaction --prefer-dist
- run: php artisan kibble:split --tag=${{ github.ref_name }}

Memberware

This package is part of our internal toolkit and is optimized for our own purposes. We do not accept issues or PRs in this repository.

artisan-build/kibble 适用场景与选型建议

artisan-build/kibble 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.16k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 artisan-build/kibble 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-24