Download the PHP package ezesha/end-year-reports without Composer

On this page you can find all versions of the php package ezesha/end-year-reports. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package end-year-reports

ezesha/end-year-reports

Asynchronous end‑year financial report generation for CodeIgniter 4.

A user picks an office and a closure date and clicks Generate Package; the HTTP request enqueues the job on Amazon SQS (LocalStack‑friendly) and returns immediately, a background worker runs an ordered pipeline (Trial Balance → Income Statement → Balance Sheet), writes the results back, and the browser polls until the package is READY. Failed jobs self‑heal via a retry command.

This module is a self‑contained CodeIgniter 4 package: controllers, worker commands, model, migration, services, views and frontend assets, all under the Ezesha\EndYearReports\ namespace and auto‑discovered by the framework.


Requirements


Installation

1. Require the package

Published to a Git host / Packagist:

Or, while developing it locally, add a path repository to the application's composer.json and require it:

CodeIgniter auto‑discovers the module's routes, commands, migrations, services and config as soon as Composer registers the namespace — no manual wiring in App\Config\* is required (Config\Modules::$discoverInComposer must stay true, which is the default).

2. Configure the environment

Add to the application .env:

3. Run the migration

The migration lives in the package namespace, so run migrations for all namespaces (or target this one):

4. Publish the frontend assets

Copies the module's JS and CSS into the app's public/ directory:

This writes public/ezesha/js/end_year_report/* and public/ezesha/styles/end_year_report.css, which the shipped view references at /ezesha/js/... and /ezesha/styles/.... The ezesha/ sub-folder namespaces the assets so they never collide with the host app's own public/js or public/styles.

5. Run the worker

Open /end_year_report in the browser, choose an office and closure date, and click Generate Package.


Usage summary

Route Purpose
GET /end_year_report The dashboard web page
GET /api/reports/office/{officeId}/{date} Enqueue + poll; returns PROCESSING/READY/FAILED
Command Purpose
workers:process-reports [--once] [--max-messages N] Consume the queue and run the compilation pipeline
workers:retry-failed [--max-age-hours N] [--dry-run] Re‑queue reports stuck in the failed state
endyearreports:publish Publish frontend assets into public/ezesha/

API states

The API is idempotent per (office_id, closure_date) (enforced by a unique key) and returns a queue_state:

A user "Generate" click sends ?retry=1 to clear a previous failure and re‑run; passive polls omit it so genuine failures surface instead of looping.


Configuration & extension

Everything tunable lives in Ezesha\EndYearReports\Config\EndYearReports. Override it by publishing an App\Config\EndYearReports class (same short name) in the host app — CodeIgniter's Factories resolve the app namespace first.

Property Default Meaning
$dataProvider MockFinancialDataProvider Class that supplies the raw financial package
$pipeline trial → income → balance Ordered stageKey => serviceClass map
$staleThresholdSeconds 240 When a pending job is treated as stalled/failed
$sqsUrl / $aws* env‑driven Connection settings (host .env overrides at construct time)

Plugging in real data (the important one)

The shipped MockFinancialDataProvider returns a static fixture so the module runs out of the box. To feed real ledger data, implement FinancialDataProviderInterface:

Then point config at it (via your App\Config\EndYearReports):

The pipeline services resolve the provider through service('financialDataProvider'), so no other change is needed.


Scheduling (optional, requires codeigniter4/tasks)

The package does not force a scheduler on you. To run the workers automatically, add these to the host app's App\Config\Tasks::init():

…and wire the CodeIgniter task runner into system cron:

Why bounded worker runs? A long‑lived PHP process caches every class in memory, so it keeps running stale code after you edit a service. Running a fresh, bounded process each tick (--max-messages) always loads current code.


Data model

Table end_year_report (see the migration):


Package layout

License

MIT — see LICENSE.


All versions of end-year-reports with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
codeigniter4/framework Version ^4.4
aws/aws-sdk-php Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ezesha/end-year-reports contains the following files

Loading the files please wait ...