定制 sbuerk/packwright 二次开发

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

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

sbuerk/packwright

Composer 安装命令:

composer create-project sbuerk/packwright

包简介

packwright — a PHP CLI tool for Composer package version handling and release publishing, with optional TYPO3 ext_emconf.php support

README 文档

README

The wright that crafts your package releases.

packwright is a PHP command-line tool for managing Composer package releases. It is designed to cover:

  • version updates across composer.json sub-keys and any other files that need to stay in sync,
  • release publishing with pre-release, release, and post-release hooks,
  • monorepository workflows where sub-packages are split out at release time,
  • semver bump suggestions (patch / minor / major) that you can accept or override,
  • manual and development releases, and
  • TYPO3-specific ext_emconf.php files (optional, for projects that need it).

For everyday use the binary also installs as pkw — same tool, fewer keystrokes (PacK Wright). Both names are interchangeable.

About the name

A wright is an old English word for a craftsman or maker, preserved today in compound nouns like shipwright, playwright, and wheelwright. packwright is the wright that crafts your package releases: it knows how to read, validate, and update the files that describe a package, so a release goes out the way you intended.

The 3-character alias pkw is the initials of the full name and is designed to stay out of the way of common Linux/PHP CLI binaries — it does not collide with pkg, pw, pwn, or the PipeWire pw-* family.

Status

Early development. The following ext_emconf.php commands are functional today; the broader Composer release workflow is on the roadmap.

  • extemconf:validate — validate one or more ext_emconf.php files.
  • extemconf:normalize — normalize and rewrite files (drops deprecated keys, fills mandatory defaults).
  • extemconf:get — read selected scalar fields (table or JSON).
  • extemconf:set — set one or more scalar fields with up-front validation.
  • extemconf:constraints:set — add or update an entry under constraints.{depends|suggests|conflicts} with cross-key collision detection. Pass --update-only to skip files where the key is not already present (idempotent batch updates).
  • extemconf:constraints:unset — remove an entry from constraints.{depends|suggests|conflicts} (idempotent).

See docs/ext-emconf-commands.md for the full command reference, including JSON output shapes and exit code semantics.

Requirements

  • PHP 8.2+

Installation

Standalone PHAR

Download a packwright (or pkw) PHAR build, make it executable, and place it on your PATH:

chmod +x packwright
mv packwright /usr/local/bin/   # or wherever your local bin lives

Both binaries are shipped from the same build (byte-identical contents); pick the name you prefer, or install both.

Composer dependency

composer require --dev sbuerk/packwright

After install, both vendor/bin/packwright and vendor/bin/pkw are available.

Usage

List all available commands:

packwright list
# or, identically:
pkw list

Validate, normalize, inspect, or edit a TYPO3 extension's ext_emconf.php:

packwright extemconf:validate path/to/ext_emconf.php
packwright extemconf:normalize path/to/ext_emconf.php
packwright extemconf:get path/to/ext_emconf.php --field=version
packwright extemconf:set path/to/ext_emconf.php --ext-version=2.0.0 --state=stable
packwright extemconf:constraints:set depends typo3 path/to/ext_emconf.php \
    --constraint='13.4.0-13.4.99'
packwright extemconf:constraints:unset depends php path/to/ext_emconf.php

Use --fail-on-warning with extemconf:validate to also fail on WARNING-state files (useful in CI). All mutating commands accept --dry-run and --json.

Contributing

See CONTRIBUTING.md for development setup, the test suite, and build instructions.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固