定制 symbiont/composer-syckdev 二次开发

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

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

symbiont/composer-syckdev

Composer 安装命令:

composer require symbiont/composer-syckdev

包简介

[Sy]mlink-pa[ck]age-[dev]elopment

README 文档

README

Syckdev (short for Symlink-package-development) is a Composer plugin that dramatically simplifies local package development workflows.

Tired of constantly running composer update after every small change in a local dependency?
Syckdev lets you activate / deactivate symlinked local versions of your packages with a few keystrokes — right from the terminal — without touching your composer.json.

Perfect for monorepo-style or multi-package development where you're actively working on several interdependent libraries at once.

[!IMPORTANT]
This project is work in progress — feedback and contributions are very welcome!

Features

  • Interactive terminal UI to toggle local dev versions on/off
  • Shows clearly which packages are using local code vs. installed versions
  • Supports aliased directory structures (when local folder ≠ Packagist name)
  • Displays dependency reasons (composer why-style)
  • No need to modify repositories or add path entries manually
  • Works globally — one installation for all your projects

Requirements

  • PHP ≥ 8.2
  • Composer ≥ 2.1

Installation

Global installation is recommended:

# Remove any old version first (if exists)
composer global remove symbiont/composer-syckdev

# Install latest version
composer global require symbiont/composer-syckdev

Make sure ~/.composer/vendor/bin (or equivalent) is in your $PATH.

Quick Setup

  1. Create a central directory where all your local packages live (e.g. ~/Development/syckdev-repo).
  2. Inside it, organize packages using the vendor/package pattern (or use aliases later).

    Example:

    ~/Development/syckdev-repo/
    ├── symbiont/
    │   ├── config/
    │   ├── dipendency/
    │   ├── dispatcher/
    │   └── support/
    │       ├── boot-trait/
    │       └── forward-call/
    └── other-vendor/
    └── some-lib/
    
  3. In every project where you want to use local overrides, create a .syckdev.json file at the root:

    {
      "path": "/home/youruser/Development/syckdev-repo",
      "packages": [
        "symbiont/dipendency",
        "symbiont/dispatcher"
      ],
      "alias": {
        "symbiont/support-boot-trait": "symbiont/support/boot-trait",
        "symbiont/support-forward-call": "symbiont/support/forward-call"
      }
    }
    
    • path — root folder containing your local packages
    • packages — (optional) packages to show by default in "required" mode
    • alias — maps Packagist-style names → real folder paths (useful when folder structure differs)

[!NOTE]
Future versions will auto-detect packages from the symlink directory using their composer.json name → no manual packages or alias needed!

Usage

Run any of these commands from your project root:

composer sd:status     # or just: composer sd

You'll enter an interactive terminal view:

Syckdev dev-main  ← project name + current branch
┌─────────┬───────────────────────────────┐
│ path    │ /home/user/syckdev-repo       │
│ package │ symbiont/composer-syckdev     │
│ mode    │ required                      │
└─────────┴───────────────────────────────┘

required mode
┌─────┬─────────────────────┬──────────┬───────────┬────────────┬─────────┬───────┬──────────────────────────────────────┐
│ nr  │ name                │ local    │ installed │ status     │ type    │ alias │ why                                  │
├─────┼─────────────────────┼──────────┼───────────┼────────────┼─────────┼───────┼──────────────────────────────────────┤
│ a:1 │ symbiont/config     │ 0a456228 │ v1.2.9 *  │ - inactive │ library │ -     │ symbiont/composer-syckdev (dev-main) │
│ a:2 │ symbiont/dipendency │ 8dd2595e │ v1.0.1 *  │ - inactive │ library │ -     │ symbiont/composer-syckdev (dev-main) │
└─────┴─────────────────────┴──────────┴───────────┴────────────┴─────────┴───────┴──────────────────────────────────────┘

q(uit)  all (show all packages)
a(ctivate):{nr}  d(eactivate):{nr}  i(nfo):{nr}
<enter option>:

Available Commands

KeyAction
qQuit
allSwitch to "all packages" mode
reqSwitch back to "required only" mode
a:5Activate package #5
d:3Deactivate package #3
i:2Show more info about package #2

After activation, status changes to + active and the command prefix flips from a:d:.

Column Reference

ColumnMeaning
nrPackage number for activation/deactivation
namePackage name (Packagist style)
localCommit / version currently present in your symlink folder
installedVersion Composer currently has installed
status- inactive or + active (using local symlink)
typecomposer.json"type" value
aliasReal folder path if aliased
whyWhy this package is present (like composer why <package>)

Coming Features

Planned improvements to make Syckdev even more powerful and convenient:

  • Automatic project-specific cloning
    One command to clone any currently used package from your project's vendor/ directory directly into the central symlink directory — organized per project.
    Example target structure:
    ~/Development/syckdev/.my-project-name/vendor/symbiont/config

  • Reset command
    A simple composer sd:reset (or similar) that deactivates all currently active symlinked packages at once, reverting everything to the Composer-installed (remote) versions.
    Ideal for quickly cleaning up before committing, deploying, or testing "production-like" behavior.

  • Web-based user interface
    An optional lightweight HTTP server (e.g. composer sd:serve) that opens a clean browser dashboard at http://localhost:some-port.
    View status, toggle packages on/off, see dependency graphs, and get detailed info — no more terminal-only interaction when you prefer a GUI.

These features are already on the roadmap — contributions and ideas are very welcome!

Running Tests

The test requires a composer .syckdev.json at the root of this project.

{
    "path": "/var/www-symlinks",
    "packages": [
        "symbiont/dipendency",
        "symbiont/dispatcher",
        "symbiont/config"
    ],
    "alias": {
        "symbiont/support-boot-trait": "symbiont/support/boot-trait",
        "symbiont/support-forward-call": "symbiont/support/forward-call"
    }
}

Then simply run

composer test

Contributing

Feel free to open issues or merge requests on GitLab.

Links

License

MIT License

symbiont/composer-syckdev 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-12