承接 gubler/doctrine-extra-types 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gubler/doctrine-extra-types

Composer 安装命令:

composer require gubler/doctrine-extra-types

包简介

Adds extra and alternate Doctrine column types

README 文档

README

This project provides extra or replacement data types for Doctrine 2.

Installation

The preferred method of installation is via Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require gubler/doctrine-extra-types

Types

UTCDateTime

The UTCDateTimeType is copied from the [Doctrine ORM documentation][doctine-docs-utc] and converts DateTime object's timezone to UTC before storing them in the database.

Use

This replaces the existing Doctrine datetime type.

In Symfony:

# config/packages/doctrine.yaml
doctrine:
   dbal:
       types:
           datetime:
               class: Gubler\DoctrineExtraTypes\UTCDateTime\UTCDateTimeType

Note: This type only converts the DateTime when saving to the database. This does not convert the datetime back to the original timezone when reading form the database. You will need to convert the UTC datetime to whichever timezone you need.

After this, you can use the datetime Doctrine type normally and any DateTimes will be converted to UTC.

Guid

This project used to supply a GUID doctrine type. This is now provided by gubler/guid-doctrine

Contributing

Contributions are welcome! Please read CONTRIBUTING for details.

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code.

Copyright and License

The gubler/doctrine-extra-types library is copyright © Daryl Gubler and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固