precision-soft / doctrine-type
doctrine自定义类型
v1.0.1
2024-09-26 14:25 UTC
Requires
- php: >=8.2
- doctrine/dbal: 3.*
Requires (Dev)
README
您可以随意分叉和修改它.
欢迎提出建议。
用法
- 为枚举扩展 \PrecisionSoft\Doctrine\Type\Contract\AbstractEnumType。
- 为集合扩展 \PrecisionSoft\Doctrine\Type\Contract\AbstractSetType。
Symfony
doctrine:
dbal:
default_connection: master
connections:
master:
url: '%env(resolve:DATABASE_URL)%'
server_version: '%env(MYSQL_SERVER_VERSION)%'
mapping_types:
enum: string
set: string
types:
datetime: \PrecisionSoft\Doctrine\Type\DateTimeType
AcmeEnum: \App\Doctrine\Type\AcmeEnum
AcmeSet: \App\Doctrine\Type\AcmeSet
待办事项
- 单元测试。
开发
git clone git@gitlab.com:precision-soft-open-source/doctrine/type.git
cd type
./dc build && ./dc up -d