rozdol / payroll
Payroll for Cyprus
v1.1.8
2022-10-04 16:10 UTC
Requires
- php: >=5.6
- rozdol/bi: ^1.0
Requires (Dev)
README
About
Payroll for Cyprus
Install
cd to your_project_root_dir
composer require rozdol/payroll:"v1.*"
in Table or Model or Controller
use Rozdol\Payroll\Payroll; $this->payroll = new Payroll(); $data=[...]; $result = $this->utils->payslip($data);
Unit Test
cd payroll
composer update rozdol/payroll
To test
./vendor/bin/phpunit tests/
Compose library Tutorial
cd payroll composer update git init git . git commit -m 'Initial commit'
Create github repo
git remote add origin git@github.com:rozdol/payroll.git git push origin master
- on github add new release (v1.0.0)
- On packagist Update Package
- Login to packagist.org
- Submit
https://github.com/rozdol/payroll
Ready to use in project
cd to your_project_root_dir
composer require rozdol/payroll
in Table or Model or Controller
use Rozdol\Payroll\Payroll; $this->payroll = new Payroll(); $date_normalized = $this->payroll->F_date('01/01/20', 1); // 01.01.2020
Connecting Github to Packagist
In Github->Settings->Integrations..->Add->Packagist user: packagist user api_key: packagist->User->Profile->Show API KEY Domain: https://packagist.org
Test: New reslease in Github and check the version in Packagist
Unit Tests
install local phpunit
composer require --dev phpunit/phpunit ^6
mkdir tests cd tests mkdir TestCase cd TestCase mkdir Funcs
edit PayrollTest.php
cd payroll
composer update rozdol/payroll
To test
./vendor/bin/phpunit tests/
in GitHub Project / Settings / Services / Add Packagist
User: rozdol Token: https://packagist.org/profile/ -> Your API Token Domain: https://packagist.org Active: true Add Service: click
Travis CI
git checkout -b travis git add .travis.yml git push origin travis
in GitHub Project / Settings / Services / Add Packagist
User: rozdol Token: https://travis-ci.org/profile/rozdol -> Copy API Token Domain: notify.travis-ci.org Active: true Add Service: click
Got to Travis Press + , swipe activation
Detactach from original source
git remote -v git remote remove origin git remote add origin git@github.com:rozdol/payroll.git git push origin random_changes