fuzzyfox/composer-version
Composer 安装命令:
composer require fuzzyfox/composer-version
包简介
Adds version management super powers similar to npm version to you project.
README 文档
README
Bump a package version
Use it in a single project:
composer require fuzzyfox/composer-version
Or use it everywhere:
composer global require fuzzyfox/composer-version
Synopsis
composer version [<newversion> | major | minor | patch | premajor | preminor | prepatch | devmajor | devminor | devpatch | prerelease [--preid=<prerelease-id>] | from-git] composer version # to print current package/composer version
Description
Run this package in a directory to bump the version and write the new data back
to composer.json.
The newversion argument should be a valid composer version string,
or, one of the following:
major- Bump to the next major version.minor- Bump to the next minor version.patch- Bump to the next patch version.premajor [--preid=<prerelease-id>]- Bump to the next major version with a prerelease suffix.preminor [--preid=<prerelease-id>]- Bump to the next minor version with a prerelease suffix.prepatch [--preid=<prerelease-id>]- Bump to the next patch version with a prerelease suffix.devmajor- Bump to the next major version with a dev suffix.devminor- Bump to the next minor version with a dev suffix.devpatch- Bump to the next patch version with a dev suffix.prerelease [--preid=<prerelease-id>]- Bump the prerelease suffix number.from-git- Attempt to get the current version fromgit
If run in a git repo, it will also create a version commit and tag.
If pre-version, pre-version-commit, or post-version are in the composer
scripts property, they will
be executed as part of running composer version.
The exact order of execution is as follows:
- Check to make sure the git working directory is clean before getting started.
- Run the
pre-versionscript. These scripts have access to the oldversionincomposer.json. Any files you want added to the commit should be explicitly added usinggit add. - Bump
versionincomposer.jsonas requested. - Run the
pre-version-commitscript. These scripts have access to the newversionincomposer.json. Again, scripts should explicitly add generated files to the commit usinggit add. - Commit and tag.
- Run the
post-versionscript. Use it to clean up the file system or automatically push the commit and/or tag.
v1.0.0
This package will be considered v1.0.0 once it has full feature parity with
npm version (though some minor naming
tweaks for composer compat), and a full set of tests.
A possible additional feature that may be added as part of v1.0.0 will be the
ability to integrate w/ npm version to keep both composer.json and package.json
in sync for codebases that desire this.
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
fuzzyfox/composer-version 适用场景与选型建议
fuzzyfox/composer-version 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 93 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 08 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「composer」 「version」 「tag」 「release」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fuzzyfox/composer-version 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fuzzyfox/composer-version 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fuzzyfox/composer-version 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Versioning behaviour for eloquent models
Converts SemVer version (like Composer packages) into integer version with operators. Helps managing versions: store, compare, sort and retrive by conditions.
Display a version number
PHP Version Manager for Windows CLI
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
统计信息
- 总下载量: 93
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2020-08-19