locr-company / progress
处理进度的类
1.1.2
2024-04-03 09:56 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.9
README
1. 安装
composer require locr-company/progress
2. 使用方法
<?php use Locr\Lib\Progress; $progress = new Progress(totalCount: 1_000); $progress->incrementCounter(); print $progress->Counter; // 1 print $progress->PercentageCompleted; // 0.1 print $progress->toFormattedString(); // progress => 1/1000 (0.10%); elapsed: 00:00:01; ete: 00:16:39; eta: 2021-10-10 20:00:01 $progress->setCounter(1000); print $progress->PercentageCompleted; // 100
3. 开发
克隆仓库
git clone git@github.com:locr-company/php-progress.git cd php-progress && composer install
4. 发布新版本
# update CHANGELOG.md file git tag -a <major>.<minor>.<patch> -m 'version <major>.<minor>.<patch>' git push git push origin --tags