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:
- The top-level
versionfield is removed so Packagist derives the version from the git tag rather than a hardcoded value (a staleversionfield breaks tag-derived/lockstep versioning). repositoriesentries whosetypeispathare removed — their../siblingurls do not exist for consumers and otherwise printThe url supplied for the path (../<sibling>) repository does not existon everycomposer require. Non-pathrepositories are preserved, and therepositorieskey 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 splitsynthesizes 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 splitneeds full history, so check out withfetch-depth: 0. Split repositories must already exist. Outside the local environment, pushes authenticate with theGH_USERNAME/GH_TOKENcredentials (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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-24