Download the PHP package azaharizaman/nexus-currency without Composer

On this page you can find all versions of the php package azaharizaman/nexus-currency. 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 nexus-currency

Nexus\Currency

License: MIT PHP Version

Framework-agnostic ISO 4217-compliant currency management and exchange rate engine for the Nexus ERP system.

Overview

The Nexus\Currency package provides authoritative currency metadata and exchange rate management following ISO 4217 standards. It complements the existing Nexus\Finance\ValueObjects\Money implementation by providing validation, formatting, and exchange rate coordination without replacing core financial value objects.

Key Features

Architecture

This package follows the "Logic in Packages, Implementation in Applications" pattern:

Integration with Nexus\Finance

The Nexus\Currency package augments (not replaces) existing financial components:

What This Package Provides

What the Application Must Implement

The consuming application (Nexus\Atomy) must provide:

  1. Currency Repository: Database-backed implementation with ISO 4217 seed data
  2. Exchange Rate Provider: Integration with external APIs (ECB, Fixer.io, etc.) using Nexus\Connector
  3. Rate Storage: Redis/Database caching implementation
  4. Service Bindings: IoC container bindings in service provider

Installation

Requirements

Core Components

1. Currency Value Object

Immutable representation of ISO 4217 currency metadata:

2. CurrencyPair Value Object

Represents a currency exchange pair:

3. CurrencyManager Service

High-level currency management:

4. ExchangeRateService

Exchange rate lookup and conversion:

Application Integration

Step 1: Implement Currency Repository

Create a database-backed repository in apps/Atomy:

Step 2: Create Database Migration

Step 3: Seed ISO 4217 Data

Step 4: Implement Exchange Rate Provider

Using Nexus\Connector for resilient API integration:

Step 5: Implement Rate Storage (Redis)

Step 6: Bind Implementations in Service Provider

Integration with Nexus\Finance

Enhancing Money Validation

Update Nexus\Finance\ValueObjects\Money to use CurrencyManager:

Currency-Aware Formatting

Add a formatting method to Money that uses currency metadata:

Usage:

Decimal Precision Strategy

The 4-Decimal Internal Standard

Nexus\Finance\ValueObjects\Money uses 4 decimal places for all internal BCMath calculations:

Why 4 decimals internally?

Currency-Specific Display Precision

Nexus\Currency provides the correct display precision per ISO 4217:

Best Practice: Calculate at 4, Display per Currency

Error Handling

All exceptions provide static factory methods for contextual error messages:

Testing

Unit Testing with In-Memory Repository

For package unit tests, create a simple in-memory implementation:

Documentation

📚 Complete Documentation

🔗 Quick Links

Documentation Description
Prerequisites System requirements and dependencies
Core Concepts ISO 4217, non-breaking augmentation, caching
Configuration Steps Complete setup guide
Laravel Integration Laravel migrations, repositories, service providers
Symfony Integration Symfony entities, services, configuration
Testing Examples Unit and integration test examples
Troubleshooting Common issues and solutions

License

MIT License - see LICENSE file for details.

Credits

Developed by the Nexus Development Team for the Nexus ERP System.

Related Packages


All versions of nexus-currency with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/log Version ^3.0
azaharizaman/nexus-common Version dev-main
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 azaharizaman/nexus-currency contains the following files

Loading the files please wait ...