Download the PHP package gosuperscript/schema-money without Composer

On this page you can find all versions of the php package gosuperscript/schema-money. 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 schema-money

Axiom Money

Tests License: MIT

A monetary extension for Axiom, providing schema types, a parser, and operator rules for monetary values with strong type safety and currency validation.

Features

Requirements

Installation

Install via Composer:

Usage

Basic Money Types

Every money type projects into Axiom's shape algebra as an opaque money identity parameterized by its currency (Money<'EUR'>). Money<'EUR'> fills a Money<'EUR' | 'USD'> slot and shares no values with Money<'USD'> — all without a single core relation rule mentioning money.

Money Parser

Parse money from various string formats:

Minor Units

Work with minor currency units (cents, pence, etc.):

MinorMonetaryType projects to the same opaque money<currency> shape as MonetaryType: the two differ only in how they read raw input at the boundary, and a value of either is the same Money, so both resolve the same operator rules.

Dynamic Monetary Type

Automatically detect and parse currency from string:

DynamicMonetaryType admits any currency at the boundary, so its currency is not statically known — it projects to an opaque money with no currency parameter. That makes it a coercion/boundary type only: it is deliberately not assignable to the currency-parameterized Money<C> the operator rules resolve for. Declare a concrete MonetaryType where you need arithmetic or comparison.

Operator rules — the MoneyExtension

Money's typing is parameterized by currency, and a signature's return type is fixed, so the rules are declared by enumeration over the host's configured currencies. Compose the extension onto the core dialect and hand it to an expression; the compiler resolves and type-checks every operator, and the compiled Program runs what it resolved with no runtime dispatch.

The rules, per configured currency:

A cross-currency operation (Money<'GBP'> + Money<'USD'>) matches no rule and is refused at compile time with a named diagnostic — no program containing it can be compiled, let alone run.

Rounding note (breaking change): previous versions returned an exact Brick\Money\RationalMoney from *// and propagated it through +/- ("rational is contagious"). Under the typed model each operator has a fixed return type, so *// now round to a Money at the currency scale using the extension's rounding mode. Chain in the rational domain yourself (via Brick) if you need to defer rounding.

Monetary Intervals

Work with ranges of monetary values:

MonetaryIntervalType projects to an opaque monetary-interval<currency> shape. The MoneyExtension contributes, per currency, the comparison of a monetary interval against a money of that currency (<, <=, >, >= → boolean) and equality between two monetary intervals of the same currency (=/==/===, !=/!==).

Development

Running Tests

Code Quality

The project enforces 100% code coverage and uses:

Dependencies

This library builds on several excellent packages:

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate and maintain the existing code quality standards.


All versions of schema-money with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-intl Version *
brick/money Version ^0.14.1
gosuperscript/axiom Version ^0.6.9
superscript/interval Version ^2.0
superscript/monetary-interval Version ^0.2.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 gosuperscript/schema-money contains the following files

Loading the files please wait ...