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: 8 months 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-26T08:35:41.000Z (over 1 year ago)
- Last Synced: 2025-02-28T14:05:39.907Z (over 1 year ago)
- Topics: cakephp, decimal, php, precision
- Language: PHP
- Homepage:
- Size: 97.7 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- 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
[](https://github.com/dereuromark/cakephp-decimal/actions/workflows/ci.yml?query=branch%3Amaster)
[](https://packagist.org/packages/dereuromark/cakephp-decimal)
[](https://codecov.io/gh/dereuromark/cakephp-decimal)
[](LICENSE)
[](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.1+**. 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