talevskiigor/composer-bump
Composer 安装命令:
composer require talevskiigor/composer-bump
包简介
Laravel artisan command to increment composer.json version.
README 文档
README
Description
Laravel Bump is a package that allows you to easy change your version of your application or package in composer.json file through an Artisan command.
Pretend you have an application or package that you would like to ensure has the right version information in composer.json, you can run php artisan bump to get automatically increase version information.
Example output
unknown@Dell-Studio-1747:~/Code/ComposerBump$ php artisan bump
Bump from: 0.0.1 to 0.0.2
unknown@Dell-Studio-1747:~/Code/ComposerBump$
Also has nice Facade to be used in about page or similar where you need to show your application or package version to the customer.
For more information about versioning please visit http://semver.org/
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
Usage
List of all commands:
php artisan bump:patch Increments PATCH version (major.minor.PATCH => verison 0.0.1)
Example output: Bump from: 0.0.1 to 0.0.2
php artisan bump:minor Bump MINOR version (major.MINOR.patch => verison 0.1.0)
Example output: Bump from: 0.0.2 to 0.1.0
php artisan bump:major Bump MAJOR version (MAJOR.minor.patch => verison 1.0.0)
Example output: Bump from: 0.1.0 to 1.0.0
Using Facade support:
In your controller you can easy get and return version of your application or package
`return ComposerBump::getVersion();`
Install
Step 1: Install through Composer
composer require talevskiigor/composer-bump
Step 2: Update config/app.php and insert the folowing line in Service Provider
Talevskiigor\ComposerBump\ComposerBumpServiceProvider::class,
Step 3 (optional): Add Facade support
'ComposerBump'=>Talevskiigor\ComposerBump\Facades\ComposerBump::class,
If you want to use this package for only local development, you don't need to update config/app.php. Instead, you can update provider app/Providers/AppServiceProvider.php, for example:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('Talevskiigor\ComposerBump\ComposerBumpServiceProvider');
}
}
Step 4: Run the new Artisan Commands
`php artisan bump` - this is alias of `bump:patch`
Nice to know
Package will make backup copy of you composer.json file on each use, so you can easy do undo on changes, simple use undo command as:
`php artisan bump:undo`
Example output:
!!! WARNING !!!!!! WARNING !!!!!! WARNING !!!
This will replace content of: composer.json file with content from file: composer.json-backup !!!
Are you suere? [y|N] (yes/no) [no]:
> yes
Restored file: composer.json-backup into file: composer.json
unknown@Dell-Studio-1747:~/Code/ComposerBump$
Contributing
Add unit tests for any new or changed functionality. Lint and test your code using PHPUnit.
- Fork it
- Switch to
developbranch (git checkout develop) - Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
- Thank You
License
Copyright (c) MIT license.
talevskiigor/composer-bump 适用场景与选型建议
talevskiigor/composer-bump 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 72.85k 次下载、GitHub Stars 达 18, 最近一次更新时间为 2016 年 01 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「composer」 「laravel」 「artisan」 「bump」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 talevskiigor/composer-bump 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 talevskiigor/composer-bump 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 talevskiigor/composer-bump 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Collection of handy Laravel artisan commands that most projects needs
Additional artisan commands for Laravel
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Enterprise-Grade Modular Architecture for Laravel Applications - A powerful Laravel package that revolutionizes application development with robust Service Repository Pattern, Dynamic Module Management, and 50+ Artisan commands for scalable, maintainable applications.
Simple ASCII output of array data
统计信息
- 总下载量: 72.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-20