rozdol/payroll

塞浦路斯工资管理系统

v1.1.8 2022-10-04 16:10 UTC

This package is auto-updated.

Last update: 2024-09-27 10:46:42 UTC


README

关于

塞浦路斯工资管理系统

安装

切换到 你的项目根目录

composer require rozdol/payroll:"v1.*"

在表格、模型或控制器中

use Rozdol\Payroll\Payroll;
$this->payroll = new Payroll();
$data=[...];
$result = $this->utils->payslip($data);

单元测试

切换到 payroll

composer update rozdol/payroll

进行测试

./vendor/bin/phpunit tests/

Compose 库教程

cd payroll
composer update
git init
git .
git commit -m 'Initial commit'

在 github 上创建仓库

git remote add origin git@github.com:rozdol/payroll.git
git push origin master
  • 在 github 上添加新版本(v1.0.0)
  • 在 Packagist 上更新包
  • 登录到 packagist.org
  • 提交 https://github.com/rozdol/payroll

准备好在项目中使用

切换到 你的项目根目录

composer require rozdol/payroll

在表格、模型或控制器中

use Rozdol\Payroll\Payroll;
$this->payroll = new Payroll();
$date_normalized = $this->payroll->F_date('01/01/20', 1); // 01.01.2020

连接 Github 到 Packagist

在 Github -> 设置 -> 集成.. -> 添加 -> Packagist 用户:packagist 用户 api_key:packagist -> 用户 -> 个人资料 -> 显示 API KEY 域名:https://packagist.org.cn

测试:在 Github 上发布新版本并检查 Packagist 上的版本

单元测试

安装本地的 phpunit

composer require --dev phpunit/phpunit ^6
mkdir tests
cd tests
mkdir TestCase
cd TestCase
mkdir Funcs

编辑 PayrollTest.php

切换到 payroll

composer update rozdol/payroll

进行测试

./vendor/bin/phpunit tests/

在 GitHub 项目 / 设置 / 服务 / 添加 Packagist

User: rozdol
Token: https://packagist.org.cn/profile/ -> Your API Token
Domain: https://packagist.org.cn
Active: true
Add Service: click

Travis CI

git checkout -b travis
git add .travis.yml
git push origin travis

在 GitHub 项目 / 设置 / 服务 / 添加 Packagist

User: rozdol
Token: https://travis-ci.org/profile/rozdol -> Copy API Token
Domain: notify.travis-ci.org
Active: true
Add Service: click

转到 Travis 按 + ,滑动激活

从原始源代码分离
git remote -v
git remote remove origin
git remote add origin git@github.com:rozdol/payroll.git
git push origin random_changes