idct-tech/php-decimal-io-dbal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

idct-tech/php-decimal-io-dbal

Composer 安装命令:

composer require idct-tech/php-decimal-io-dbal

包简介

Missing link between php-decimal.io and Doctrine.

README 文档

README

The missing link between Doctrine and php-decimal.io.

Installation

You require at least PHP 8.0, decimal extension and php-decimal library (installed via composer).

To install this library just type:

composer require idct-tech/php-decimal-io-dbal

Then in your doctrine configuration be sure to set up the mapping: https://www.doctrine-project.org/projects/doctrine-orm/en/2.9/cookbook/custom-mapping-types.html

In Symfony 4+, 5+ you can set this up in your config/packages/doctrine.yaml:

doctrine:
    dbal:
        types:
            php_decimal_io:  IDCT\Dbal\PhpDecimalIoType\PhpDecimalIoType

Usage

In your field declarations use type php_decimal_io, for example:

    /**
     * @ORM\Column(type="php_decimal_io"))
     */
    private Decimal $totalStake;

Precision is set to 65 which means that maximum number of digits which can be stored is 65.

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固