Skip to content

teamshadi/ffa-php-cli

Repository files navigation

ffa-php-cli Build Status

A CLI for ffa-php-mock and ffa-php-core

The goal is to

  • replace my dispersed scripts into this one package
  • pack it into a .phar file (similar to composer)
  • replace all my script calls in the crons with php ffa.phar department:report --parameters
  • drop my ffa-mfe/databases-api project

Installation

Below code snippets are for linux

  1. Install php 7
  2. Install composer
  3. Install package dependencies: php composer.phar install

Usage

The current CLI is in another repository and needs to be rewritten. This is the rewrite, and it uses Symfony2/Console. Here are example usages before and after the rewrite:

treasury: debit interest

Currently in ffa-php-mock:

php bin/treasury-debitInterest.php
php bin/treasury-debitInterest.php format=json
php bin/treasury-debitInterest.php format=json       date_month=2015-01
php bin/treasury-debitInterest.php format=emailIfAny
php bin/treasury-debitInterest.php format=emailIfAny accountType=Tanya notifyTracker=true publishToBlog=true

To become in this package:

php bin/ffa.php treasury:debit-interest
php bin/ffa.php treasury:debit-interest --format=json
php bin/ffa.php treasury:debit-interest --format=json       --date_month=2015-01
php bin/ffa.php treasury:debit-interest --format=emailIfAny
php bin/ffa.php treasury:debit-interest --format=emailIfAny --accountType=Tanya --notifyTracker --publishToBlog

The rewrite process will start with the treasury debit interests report and gradually include all other reports

treasury: SOA

Currently in ffa-php-mock:

php bin/treasury-soa.php format=email emailTo="[email protected];[email protected]" base=Dubai
php bin/treasury-soa.php format=email emailTo="[email protected];[email protected]" base=Dubai notifyTracker=true publishToBlog=true

To become

php bin/ffa.php treasury:soa --base=Dubai --format=email --emailTo="[email protected];[email protected]"
php bin/ffa.php treasury:soa --base=Dubai --format=email --emailTo="[email protected];[email protected]" --notifyTracker --publishToBlog

treasury: FFA017

Currently in ffa-php-mock:

php bin/treasury-ffa017.php emailTo="[email protected];[email protected]"

To become

php bin/ffa.php treasury:ffa017 --emailTo="[email protected];[email protected]"

treasury: CMT

Currently in ffa-php-mock:

php bin/treasury-cmt.php format=email base=Dubai notifyTracker=true

To become

php bin/ffa.php treasury:cmt --format=email --base=Dubai --notifyTracker

Releases

No releases published

Packages

No packages published

Languages