dereuromark / cakephp-decimal
CakePHP plugin for decimal handling via value object. Provides DecimalType class.
Package info
github.com/dereuromark/cakephp-decimal
Type:cakephp-plugin
pkg:composer/dereuromark/cakephp-decimal
2.3.0
2025-04-17 19:11 UTC
Requires
- php: >=8.1
- cakephp/cakephp: ^5.0.0
- php-collective/decimal-object: ^1.0.0
Requires (Dev)
- fig-r/psr2r-sniffer: dev-master
- phpunit/phpunit: ^10.5 || ^11.5 || ^12.1
README
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 for details.
Requirements
- Uses 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.
Demo
Live example see https://sandbox.dereuromark.de/sandbox/decimal-examples/forms