Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dereuromark/cakephp-decimal
CakePHP Decimal type handling using Decimal value object.
https://github.com/dereuromark/cakephp-decimal
cakephp decimal php precision
Last synced: 12 days ago
JSON representation
CakePHP Decimal type handling using Decimal value object.
- Host: GitHub
- URL: https://github.com/dereuromark/cakephp-decimal
- Owner: dereuromark
- License: mit
- Created: 2019-08-14T00:18:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T12:15:43.000Z (15 days ago)
- Last Synced: 2024-10-25T19:13:48.181Z (14 days ago)
- Topics: cakephp, decimal, php, precision
- Language: PHP
- Homepage:
- Size: 91.8 KB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cakephp - CakeDecimal plugin - A value object approach on handling decimals. (ORM / Database / Datamapping)
README
# CakePHP Decimal Plugin
[![CI](https://github.com/dereuromark/cakephp-decimal/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/dereuromark/cakephp-decimal/actions/workflows/ci.yml?query=branch%3Amaster)
[![Latest Stable Version](https://poser.pugx.org/dereuromark/cakephp-decimal/v/stable.svg)](https://packagist.org/packages/dereuromark/cakephp-decimal)
[![codecov](https://codecov.io/gh/dereuromark/cakephp-decimal/branch/master/graph/badge.svg)](https://codecov.io/gh/dereuromark/cakephp-decimal)
[![License](https://poser.pugx.org/dereuromark/cakephp-decimal/license.svg)](LICENSE)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)This is an alternative to
* the core Decimal type (using plain strings)As value object you have a few advantages, especially on handling the values inside your business logic.
This branch is for use with **CakePHP 5.0+**. See [version map](https://github.com/dereuromark/cakephp-decimal/wiki#cakephp-version-map) for details.
## Requirements
- Uses [php-collective/decimal-object](https://github.com/php-collective/decimal-object) and as such requires bcmath extension.
## Installation
Require the plugin through Composer:
```
composer require dereuromark/cakephp-decimal
```## Setup and Usage
See [Documentation](docs/).## Demo
Live example see https://sandbox.dereuromark.de/sandbox/decimal-examples/forms